diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-01-29 14:29:24 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-01-29 14:29:24 -0300 |
| commit | c31d6774ac7db4cfbc548ce507ae65ab6036f873 (patch) | |
| tree | 906369526757f8a26ad213ba571f18d58a9776ac /lapi.c | |
| parent | 108e0bdc8495782544c351b17eaae1411a910e89 (diff) | |
| download | lua-c31d6774ac7db4cfbc548ce507ae65ab6036f873.tar.gz lua-c31d6774ac7db4cfbc548ce507ae65ab6036f873.tar.bz2 lua-c31d6774ac7db4cfbc548ce507ae65ab6036f873.zip | |
Details
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); |
