mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 19:25:20 -04:00
bit32 should always be require()
, regardless of arch
too bad we weren't clearing it from _G on boot, else we would have seen this bug i'm choosing to NOT clear in from _G on boot .. for now ..
This commit is contained in:
parent
4ec7254e94
commit
9cdbaed1f5
@ -1,3 +1,4 @@
|
|||||||
|
local bit32 = require("bit32")
|
||||||
local uuid = {}
|
local uuid = {}
|
||||||
|
|
||||||
function uuid.next()
|
function uuid.next()
|
||||||
@ -11,7 +12,7 @@ function uuid.next()
|
|||||||
if result:len() > 0 then
|
if result:len() > 0 then
|
||||||
result = result .. "-"
|
result = result .. "-"
|
||||||
end
|
end
|
||||||
for i = 1,set do
|
for _ = 1,set do
|
||||||
local byte = math.random(0, 255)
|
local byte = math.random(0, 255)
|
||||||
if pos == 6 then
|
if pos == 6 then
|
||||||
byte = bit32.bor(bit32.band(byte, 0x0F), 0x40)
|
byte = bit32.bor(bit32.band(byte, 0x0F), 0x40)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user