mirror of
https://github.com/iDvel/rime-ice.git
synced 2026-05-14 00:30:37 +08:00
fix: uuid.lua ensure randomseed() works on both Lua 5.3 and 5.4 #1473
This commit is contained in:
@@ -33,7 +33,7 @@ end
|
|||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
function M.init(env)
|
function M.init(env)
|
||||||
randomseed(os.time() + os.clock() * 1000)
|
randomseed(math.floor(os.time() + os.clock() * 1000))
|
||||||
M.uuid = env.engine.schema.config:get_string(env.name_space:gsub("^*", "")) or "uuid"
|
M.uuid = env.engine.schema.config:get_string(env.name_space:gsub("^*", "")) or "uuid"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user