Permalink
Browse files

Fix math.random with one parameter call

  • Loading branch information...
mugmuggy committed Nov 15, 2018
1 parent e14d4ff commit 072270daa8bf56218a77230cc046374aa6f005a7
Showing with 1 addition and 1 deletion.
  1. +1 −1 CorsixTH/Src/random.c
@@ -145,7 +145,7 @@ static int l_random(lua_State *L)
case 1:
max = (uint32_t)luaL_checkinteger(L, 1);
luaL_argcheck(L, 1 <= max, 1, "interval is empty");
lua_pushinteger(L, (lua_Integer)(genrand_int32() % max));
lua_pushinteger(L, 1 + (lua_Integer)(genrand_int32() % max));
break;
case 0:
lua_pushnumber(L, (lua_Number)genrand_res53());

0 comments on commit 072270d

Please sign in to comment.