diff options
-rw-r--r-- | lmathlib.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lmathlib.c,v 1.67 2005/08/26 17:36:32 roberto Exp roberto $ | 2 | ** $Id: lmathlib.c,v 1.68 2006/08/07 19:01:56 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 | */ |
@@ -211,6 +211,7 @@ static int math_random (lua_State *L) { | |||
211 | 211 | ||
212 | static int math_randomseed (lua_State *L) { | 212 | static int math_randomseed (lua_State *L) { |
213 | srand(luaL_checkint(L, 1)); | 213 | srand(luaL_checkint(L, 1)); |
214 | (void)rand(); /* discard first value to avoid undesirable correlations */ | ||
214 | return 0; | 215 | return 0; |
215 | } | 216 | } |
216 | 217 | ||