1
0
mirror of https://github.com/skywind3000/z.lua synced 2026-03-13 19:29:49 +00:00

commit new files

This commit is contained in:
skywind3000
2018-04-03 02:54:52 +08:00
parent 25f76b88c3
commit f71d952664

5
z.lua
View File

@@ -441,6 +441,11 @@ function math.random_init()
if status then
seed = seed .. tostring(socket.gettime())
end
-- random seed from _ZL_RANDOM
local rnd = os.getenv('_ZL_RANDOM')
if rnd ~= nil then
seed = seed .. rnd
end
local number = 0
for i = 1, seed:len() do
local k = string.byte(seed:sub(i, i))