get version from correct octet
This commit is contained in:
parent
ce575e983e
commit
5f72daa789
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue