diff options
Diffstat (limited to 'lbaselib.c')
-rw-r--r-- | lbaselib.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.283 2014/02/13 12:11:34 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.284 2014/02/14 16:45:38 roberto Exp roberto $ |
3 | ** Basic library | 3 | ** Basic library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -246,8 +246,7 @@ static int ipairsaux (lua_State *L) { | |||
246 | luaL_checktype(L, 1, LUA_TTABLE); | 246 | luaL_checktype(L, 1, LUA_TTABLE); |
247 | i++; /* next value */ | 247 | i++; /* next value */ |
248 | lua_pushinteger(L, i); | 248 | lua_pushinteger(L, i); |
249 | lua_rawgeti(L, 1, i); | 249 | return (lua_rawgeti(L, 1, i) == LUA_TNIL) ? 1 : 2; |
250 | return (lua_isnil(L, -1)) ? 1 : 2; | ||
251 | } | 250 | } |
252 | 251 | ||
253 | 252 | ||