Fixed missing lua_pops after calls to lua_len
@@ -22,6 +22,7 @@
/* Get the size of the array. */ \
lua_len(sc->_lua, index); \
int size = luaL_checkint(sc->_lua, -1); \
+ lua_pop(sc->_lua, 1); \
if (size <= 0) \
return LuaArray<type>((type*)NULL); \
\
@@ -121,6 +121,7 @@ ScriptUtil::LuaArray<T> ScriptUtil::getObjectPointer(int index, const char* type
// Get the size of the array.
lua_len(sc->_lua, index);
int size = luaL_checkint(sc->_lua, -1);
+ lua_pop(sc->_lua, 1);
if (size <= 0)
{