mirror of
https://github.com/iDvel/rime-ice.git
synced 2026-02-02 02:56:45 +00:00
fix(uuid): Improve UUID generation logic with modular arithmetic (#1428)
This commit is contained in:
@@ -17,9 +17,9 @@ local function generate_uuid_v4()
|
||||
rand(0, 255),
|
||||
rand(0, 255),
|
||||
rand(0, 255),
|
||||
(rand(0, 255) & 0x0F) | 0x40,
|
||||
((rand(0, 255) % 16) + 64),
|
||||
rand(0, 255),
|
||||
(rand(0, 255) & 0x3F) | 0x80,
|
||||
((rand(0, 255) % 64) + 128),
|
||||
rand(0, 255),
|
||||
rand(0, 255),
|
||||
rand(0, 255),
|
||||
|
||||
Reference in New Issue
Block a user