1
0
Fork 0

get version from correct octet

This commit is contained in:
Kevin Matz 2021-08-22 15:46:02 -04:00
parent ce575e983e
commit 5f72daa789
1 changed files with 2 additions and 2 deletions

View File

@ -223,7 +223,7 @@ void uuid::setRFC4122Bytes_()
std::memcpy(raw_, &fields, UUID_LENGTH);
// version
raw_[7] = (raw_[7] & 0x0f) | (version_ << 4);
raw_[6] = (raw_[6] & 0x0f) | (version_ << 4);
// type
raw_[8] = (raw_[8] & 0b00111111) | (0b10 << 6);
}
@ -274,7 +274,7 @@ void uuid::setRFC4122Fields_()
timestamp_ |= (uint64_t)fields.time_mid << 32;
timestamp_ |= (uint64_t)(fields.time_hi_version & 0x0fff) << 48;
switch (raw_[7] >> 4) {
switch (raw_[6] >> 4) {
case TIME:
version_ = TIME;
break;