aboutsummaryrefslogtreecommitdiff
path: root/lmathlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-06-26 15:38:28 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-06-26 15:38:28 -0300
commita77d263e86feea55529800028f960d7124c1385f (patch)
tree88bc21289c5ef341a7f3509c067524fea7003049 /lmathlib.c
parent7cc40851e1d1a18a4c45fca31dbccd4206050b11 (diff)
downloadlua-a77d263e86feea55529800028f960d7124c1385f.tar.gz
lua-a77d263e86feea55529800028f960d7124c1385f.tar.bz2
lua-a77d263e86feea55529800028f960d7124c1385f.zip
unsigned-manipulation functions (lua_puhsunsigned, lua_tounsigned, etc.)
deprecated
Diffstat (limited to 'lmathlib.c')
-rw-r--r--lmathlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lmathlib.c b/lmathlib.c
index 711f1d3a..1e5c3ede 100644
--- a/lmathlib.c
+++ b/lmathlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lmathlib.c,v 1.102 2014/06/02 23:09:28 roberto Exp roberto $ 2** $Id: lmathlib.c,v 1.103 2014/06/18 12:35:53 roberto Exp roberto $
3** Standard mathematical library 3** Standard mathematical library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -257,7 +257,7 @@ static int math_random (lua_State *L) {
257 257
258 258
259static int math_randomseed (lua_State *L) { 259static int math_randomseed (lua_State *L) {
260 l_srand((unsigned int)luaL_checkunsigned(L, 1)); 260 l_srand((unsigned int)(lua_Integer)luaL_checknumber(L, 1));
261 (void)rand(); /* discard first value to avoid undesirable correlations */ 261 (void)rand(); /* discard first value to avoid undesirable correlations */
262 return 0; 262 return 0;
263} 263}