luaa: pop element if we do not call lua_next()

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-12-10 10:10:49 +01:00
parent 22b7a79313
commit 1bc9d234e5
1 changed files with 2 additions and 0 deletions

2
luaa.c
View File

@ -297,6 +297,8 @@ luaA_next(lua_State *L, int idx)
}
else if(lua_istable(L, idx))
return lua_next(L, idx);
/* remove the key */
lua_pop(L, 1);
return 0;
}