diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-06-26 15:38:28 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-06-26 15:38:28 -0300 |
| commit | a77d263e86feea55529800028f960d7124c1385f (patch) | |
| tree | 88bc21289c5ef341a7f3509c067524fea7003049 /lmathlib.c | |
| parent | 7cc40851e1d1a18a4c45fca31dbccd4206050b11 (diff) | |
| download | lua-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -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 | ||
| 259 | static int math_randomseed (lua_State *L) { | 259 | static 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 | } |
