From 13778806115d1ca821364868f7b4666ad70f29a9 Mon Sep 17 00:00:00 2001 From: multiSnow <2306079+multiSnow@users.noreply.github.com> Date: Wed, 1 Jul 2020 17:26:46 +0800 Subject: [PATCH] only use int random number for math.randomseed [This commit was cherry-picked from https://github.com/awesomeWM/awesome/pull/3124) --- awesome.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awesome.c b/awesome.c index c71699d91..6a103526a 100644 --- a/awesome.c +++ b/awesome.c @@ -84,7 +84,7 @@ init_rng(void) lua_getfield(L, -1, "randomseed"); /* Push a seed */ - lua_pushnumber(L, g_random_int() + g_random_double()); + lua_pushnumber(L, g_random_int()); /* Call math.randomseed */ lua_call(L, 1, 0);