diff options
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -1262,9 +1262,8 @@ LUA_API int lua_next (lua_State *L, int idx) { | |||
1262 | api_checknelems(L, 1); | 1262 | api_checknelems(L, 1); |
1263 | t = gettable(L, idx); | 1263 | t = gettable(L, idx); |
1264 | more = luaH_next(L, t, L->top.p - 1); | 1264 | more = luaH_next(L, t, L->top.p - 1); |
1265 | if (more) { | 1265 | if (more) |
1266 | api_incr_top(L); | 1266 | api_incr_top(L); |
1267 | } | ||
1268 | else /* no more elements */ | 1267 | else /* no more elements */ |
1269 | L->top.p -= 1; /* remove key */ | 1268 | L->top.p -= 1; /* remove key */ |
1270 | lua_unlock(L); | 1269 | lua_unlock(L); |