luaa: only handle tables in loop check

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-04-03 11:44:08 +02:00
parent c036c8d234
commit 16606c6744
1 changed files with 22 additions and 19 deletions

3
luaa.c
View File

@ -561,6 +561,8 @@ luaA_hasitem(lua_State *L, const void *item)
static bool
luaA_isloop_check(lua_State *L, void_array_t *elems)
{
if(lua_istable(L, -1))
{
const void *object = lua_topointer(L, -1);
/* Check that the object table is not already in the list */
@ -584,6 +586,7 @@ luaA_isloop_check(lua_State *L, void_array_t *elems)
/* remove value, keep key for next iteration */
lua_pop(L, 1);
}
}
return true;
}