only use int random number for math.randomseed
[This commit was cherry-picked from https://github.com/awesomeWM/awesome/pull/3124)
This commit is contained in:
parent
cd79080e70
commit
1377880611
|
@ -84,7 +84,7 @@ init_rng(void)
|
||||||
lua_getfield(L, -1, "randomseed");
|
lua_getfield(L, -1, "randomseed");
|
||||||
|
|
||||||
/* Push a seed */
|
/* Push a seed */
|
||||||
lua_pushnumber(L, g_random_int() + g_random_double());
|
lua_pushnumber(L, g_random_int());
|
||||||
|
|
||||||
/* Call math.randomseed */
|
/* Call math.randomseed */
|
||||||
lua_call(L, 1, 0);
|
lua_call(L, 1, 0);
|
||||||
|
|
Loading…
Reference in New Issue