diff options
author | Peter Drahoš <drahosp@gmail.com> | 2015-12-16 00:14:02 +0100 |
---|---|---|
committer | Peter Drahoš <drahosp@gmail.com> | 2015-12-16 00:14:02 +0100 |
commit | fcdc5efb13f0d6c03d2868b7476b73e63a291ed3 (patch) | |
tree | 5bd844d3ae48e03d1aac8ebef3dd6209549d246e /src/lmathlib.c | |
parent | 94f9f6c6ed0fbc1b49ab4a896d6a587ce8815e36 (diff) | |
download | lua-5.3.tar.gz |
Diffstat (limited to 'src/lmathlib.c')
-rw-r--r-- | src/lmathlib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lmathlib.c b/src/lmathlib.c index 4f2ec60..94815f1 100644 --- a/src/lmathlib.c +++ b/src/lmathlib.c @@ -1,5 +1,5 @@ /* -** $Id: lmathlib.c,v 1.115 2015/03/12 14:04:04 roberto Exp $ +** $Id: lmathlib.c,v 1.117 2015/10/02 15:39:23 roberto Exp $ ** Standard mathematical library ** See Copyright Notice in lua.h */ @@ -39,7 +39,7 @@ static int math_abs (lua_State *L) { if (lua_isinteger(L, 1)) { lua_Integer n = lua_tointeger(L, 1); - if (n < 0) n = (lua_Integer)(0u - n); + if (n < 0) n = (lua_Integer)(0u - (lua_Unsigned)n); lua_pushinteger(L, n); } else @@ -273,7 +273,7 @@ static int math_random (lua_State *L) { static int math_randomseed (lua_State *L) { l_srand((unsigned int)(lua_Integer)luaL_checknumber(L, 1)); - (void)rand(); /* discard first value to avoid undesirable correlations */ + (void)l_rand(); /* discard first value to avoid undesirable correlations */ return 0; } |