luaa: only handle tables in loop check
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
c036c8d234
commit
16606c6744
3
luaa.c
3
luaa.c
|
@ -560,6 +560,8 @@ luaA_hasitem(lua_State *L, const void *item)
|
||||||
*/
|
*/
|
||||||
static bool
|
static bool
|
||||||
luaA_isloop_check(lua_State *L, void_array_t *elems)
|
luaA_isloop_check(lua_State *L, void_array_t *elems)
|
||||||
|
{
|
||||||
|
if(lua_istable(L, -1))
|
||||||
{
|
{
|
||||||
const void *object = lua_topointer(L, -1);
|
const void *object = lua_topointer(L, -1);
|
||||||
|
|
||||||
|
@ -584,6 +586,7 @@ luaA_isloop_check(lua_State *L, void_array_t *elems)
|
||||||
/* remove value, keep key for next iteration */
|
/* remove value, keep key for next iteration */
|
||||||
lua_pop(L, 1);
|
lua_pop(L, 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue