Skip to content

Commit 368570a

Browse files
committed
fix: uuid.lua ensure randomseed() works on both Lua 5.3 and 5.4 #1473
1 parent 42b6aa4 commit 368570a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/uuid.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ end
3333
local M = {}
3434

3535
function M.init(env)
36-
randomseed(os.time() + os.clock() * 1000)
36+
randomseed(math.floor(os.time() + os.clock() * 1000))
3737
M.uuid = env.engine.schema.config:get_string(env.name_space:gsub("^*", "")) or "uuid"
3838
end
3939

0 commit comments

Comments
 (0)