Update variant mask

This commit is contained in:
Abdelrahman Said 2025-03-20 06:45:10 +00:00
parent c028051537
commit 0a8179acd7

View File

@ -27,7 +27,7 @@ int main(void) {
UUID4 gen_uuid4(XOR256State *state) { UUID4 gen_uuid4(XOR256State *state) {
UUID4 uuid = { .high = wapp_xorshift_256_generate(state), .low = wapp_xorshift_256_generate(state) }; UUID4 uuid = { .high = wapp_xorshift_256_generate(state), .low = wapp_xorshift_256_generate(state) };
uuid.high = (uuid.high & 0xffffffffffff0fff) | 0x0000000000004000; uuid.high = (uuid.high & 0xffffffffffff0fff) | 0x0000000000004000;
uuid.low = (uuid.low & 0xbfffffffffffffff) | 0x8000000000000000; uuid.low = (uuid.low & 0x3fffffffffffffff) | 0x8000000000000000;
return uuid; return uuid;
} }