diff options
Diffstat (limited to 'apps/plugins/lua/ltable.c')
-rw-r--r-- | apps/plugins/lua/ltable.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/plugins/lua/ltable.c b/apps/plugins/lua/ltable.c index ec84f4fabc..31162fe7c1 100644 --- a/apps/plugins/lua/ltable.c +++ b/apps/plugins/lua/ltable.c | |||
@@ -358,6 +358,8 @@ static void rehash (lua_State *L, Table *t, const TValue *ek) { | |||
358 | Table *luaH_new (lua_State *L, int narray, int nhash) { | 358 | Table *luaH_new (lua_State *L, int narray, int nhash) { |
359 | Table *t = luaM_new(L, Table); | 359 | Table *t = luaM_new(L, Table); |
360 | luaC_link(L, obj2gco(t), LUA_TTABLE); | 360 | luaC_link(L, obj2gco(t), LUA_TTABLE); |
361 | sethvalue2s(L, L->top, t); /* put table on stack */ | ||
362 | incr_top(L); | ||
361 | t->metatable = NULL; | 363 | t->metatable = NULL; |
362 | t->flags = cast_byte(~0); | 364 | t->flags = cast_byte(~0); |
363 | /* temporary values (kept only if some malloc fails) */ | 365 | /* temporary values (kept only if some malloc fails) */ |
@@ -367,6 +369,7 @@ Table *luaH_new (lua_State *L, int narray, int nhash) { | |||
367 | t->node = cast(Node *, dummynode); | 369 | t->node = cast(Node *, dummynode); |
368 | setarrayvector(L, t, narray); | 370 | setarrayvector(L, t, narray); |
369 | setnodevector(L, t, nhash); | 371 | setnodevector(L, t, nhash); |
372 | L->top--; /* remove table from stack */ | ||
370 | return t; | 373 | return t; |
371 | } | 374 | } |
372 | 375 | ||