diff options
Diffstat (limited to 'src/ltablib.c')
-rw-r--r-- | src/ltablib.c | 4 |
1 files changed, 1 insertions, 3 deletions
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); |