diff options
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.92 2013/07/22 16:05:53 roberto Exp roberto $ | 2 | ** $Id: lmathlib.c,v 1.93 2014/03/31 19:00:52 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 | */ |
| @@ -250,7 +250,7 @@ static int math_random (lua_State *L) { | |||
| 250 | 250 | ||
| 251 | 251 | ||
| 252 | static int math_randomseed (lua_State *L) { | 252 | static int math_randomseed (lua_State *L) { |
| 253 | srand(luaL_checkunsigned(L, 1)); | 253 | srand((unsigned int)luaL_checkunsigned(L, 1)); |
| 254 | (void)rand(); /* discard first value to avoid undesirable correlations */ | 254 | (void)rand(); /* discard first value to avoid undesirable correlations */ |
| 255 | return 0; | 255 | return 0; |
| 256 | } | 256 | } |
