mirror of
https://github.com/php-win-ext/php-lua.git
synced 2026-03-24 00:52:12 +01:00
fix crashes when printing tables
This commit is contained in:
3
lua.c
3
lua.c
@@ -321,10 +321,7 @@ zval *php_lua_get_zval_from_lua(lua_State *L, int index, zval *lua_obj, zval *rv
|
||||
break;
|
||||
case LUA_TTABLE:
|
||||
array_init(rv);
|
||||
lua_pushvalue(L, index); /* stack now contains: -1 => table */
|
||||
|
||||
lua_pushnil(L); /* first key */
|
||||
/* stack now contains: -1 => nil; -2 => table */
|
||||
while (lua_next(L, -2) != 0) {
|
||||
zval key, val;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user