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:
payonel 2018-03-29 13:45:26 -07:00
parent 4ec7254e94
commit 9cdbaed1f5

View File

@ -1,3 +1,4 @@
local bit32 = require("bit32")
local uuid = {}
function uuid.next()
@ -11,7 +12,7 @@ function uuid.next()
if result:len() > 0 then
result = result .. "-"
end
for i = 1,set do
for _ = 1,set do
local byte = math.random(0, 255)
if pos == 6 then
byte = bit32.bor(bit32.band(byte, 0x0F), 0x40)