aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-01-29 14:29:24 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-01-29 14:29:24 -0300
commitc31d6774ac7db4cfbc548ce507ae65ab6036f873 (patch)
tree906369526757f8a26ad213ba571f18d58a9776ac /lapi.c
parent108e0bdc8495782544c351b17eaae1411a910e89 (diff)
downloadlua-c31d6774ac7db4cfbc548ce507ae65ab6036f873.tar.gz
lua-c31d6774ac7db4cfbc548ce507ae65ab6036f873.tar.bz2
lua-c31d6774ac7db4cfbc548ce507ae65ab6036f873.zip
Details
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lapi.c b/lapi.c
index b8e58801..bb76b15a 100644
--- a/lapi.c
+++ b/lapi.c
@@ -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);