1
0
Fork 0

cast to wider type before bitshift

This commit is contained in:
Kevin Matz 2021-08-22 17:41:46 -04:00
parent b147ca0578
commit ec6edf19e0
1 changed files with 2 additions and 2 deletions

View File

@ -284,10 +284,10 @@ void uuid::setRFC4122Fields_()
}
clock_seq_ = fields.clock_seq_low;
clock_seq_ |= (fields.clock_seq_hi_variant & 0b00111111) << 8;
clock_seq_ |= (uint16_t)(fields.clock_seq_hi_variant & 0b00111111) << 8;
node_ = fields.node_low;
node_ |= (fields.node_high << 16);
node_ |= (uint64_t)fields.node_high << 16;
}