From a77d263e86feea55529800028f960d7124c1385f Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 26 Jun 2014 15:38:28 -0300 Subject: unsigned-manipulation functions (lua_puhsunsigned, lua_tounsigned, etc.) deprecated --- lmathlib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lmathlib.c') diff --git a/lmathlib.c b/lmathlib.c index 711f1d3a..1e5c3ede 100644 --- a/lmathlib.c +++ b/lmathlib.c @@ -1,5 +1,5 @@ /* -** $Id: lmathlib.c,v 1.102 2014/06/02 23:09:28 roberto Exp roberto $ +** $Id: lmathlib.c,v 1.103 2014/06/18 12:35:53 roberto Exp roberto $ ** Standard mathematical library ** See Copyright Notice in lua.h */ @@ -257,7 +257,7 @@ static int math_random (lua_State *L) { static int math_randomseed (lua_State *L) { - l_srand((unsigned int)luaL_checkunsigned(L, 1)); + l_srand((unsigned int)(lua_Integer)luaL_checknumber(L, 1)); (void)rand(); /* discard first value to avoid undesirable correlations */ return 0; } -- cgit v1.2.3-55-g6feb