diff options
Diffstat (limited to '')
| -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 | } |
