diff options
author | Lua Team <team@lua.org> | 2013-03-07 12:00:00 +0000 |
---|---|---|
committer | repogen <> | 2013-03-07 12:00:00 +0000 |
commit | a101faf3e9db5b8b47cb0bcfb973b13d46ca304a (patch) | |
tree | 54cf972af9830e318800f0692faad2b93a4a8a27 /src | |
parent | 00ce46285bde86085185308a4197c15bc0b642bd (diff) | |
download | lua-github-5.2.2-rc3.tar.gz |
Lua 5.2.2-rc35.2.2-rc3
Diffstat (limited to 'src')
-rw-r--r-- | src/lmathlib.c | 4 | ||||
-rw-r--r-- | src/ltablib.c | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/lmathlib.c b/src/lmathlib.c index a703c33b..a49f1fd2 100644 --- a/src/lmathlib.c +++ b/src/lmathlib.c @@ -1,5 +1,5 @@ /* -** $Id: lmathlib.c,v 1.82 2013/01/29 16:00:40 roberto Exp $ +** $Id: lmathlib.c,v 1.83 2013/03/07 18:21:32 roberto Exp $ ** Standard mathematical library ** See Copyright Notice in lua.h */ @@ -160,7 +160,7 @@ static int math_frexp (lua_State *L) { static int math_ldexp (lua_State *L) { lua_Number x = luaL_checknumber(L, 1); - lua_Number ep = luaL_checknumber(L, 2); + int ep = luaL_checkint(L, 2); lua_pushnumber(L, l_mathop(ldexp)(x, ep)); return 1; } diff --git a/src/ltablib.c b/src/ltablib.c index 41f5df80..ad798b4e 100644 --- a/src/ltablib.c +++ b/src/ltablib.c @@ -1,5 +1,5 @@ /* -** $Id: ltablib.c,v 1.64 2013/02/06 18:29:03 roberto Exp $ +** $Id: ltablib.c,v 1.65 2013/03/07 18:17:24 roberto Exp $ ** Library for Table Manipulation ** See Copyright Notice in lua.h */ @@ -70,8 +70,6 @@ static int tremove (lua_State *L) { int pos = luaL_optint(L, 2, size); if (pos != size) /* validate 'pos' if given */ luaL_argcheck(L, 1 <= pos && pos <= size + 1, 1, "position out of bounds"); - else if (size == 0) /* empty table? */ - return 0; /* return nothing (nil) */ lua_rawgeti(L, 1, pos); /* result = t[pos] */ for ( ; pos < size; pos++) { lua_rawgeti(L, 1, pos+1); |