aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/ltests.c b/ltests.c
index 15d1a564..6f556dc9 100644
--- a/ltests.c
+++ b/ltests.c
@@ -362,8 +362,11 @@ static void checktable (global_State *g, Table *h) {
362 Node *n, *limit = gnode(h, sizenode(h)); 362 Node *n, *limit = gnode(h, sizenode(h));
363 GCObject *hgc = obj2gco(h); 363 GCObject *hgc = obj2gco(h);
364 checkobjrefN(g, hgc, h->metatable); 364 checkobjrefN(g, hgc, h->metatable);
365 for (i = 0; i < asize; i++) 365 for (i = 0; i < asize; i++) {
366 checkvalref(g, hgc, &h->array[i]); 366 TValue aux;
367 arr2obj(h, i + 1, &aux);
368 checkvalref(g, hgc, &aux);
369 }
367 for (n = gnode(h, 0); n < limit; n++) { 370 for (n = gnode(h, 0); n < limit; n++) {
368 if (!isempty(gval(n))) { 371 if (!isempty(gval(n))) {
369 TValue k; 372 TValue k;
@@ -1004,7 +1007,8 @@ static int table_query (lua_State *L) {
1004 } 1007 }
1005 else if ((unsigned int)i < asize) { 1008 else if ((unsigned int)i < asize) {
1006 lua_pushinteger(L, i); 1009 lua_pushinteger(L, i);
1007 pushobject(L, &t->array[i]); 1010 arr2obj(t, i + 1, s2v(L->top.p));
1011 api_incr_top(L);
1008 lua_pushnil(L); 1012 lua_pushnil(L);
1009 } 1013 }
1010 else if ((i -= asize) < sizenode(t)) { 1014 else if ((i -= asize) < sizenode(t)) {