diff options
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -365,7 +365,7 @@ static void checktable (global_State *g, Table *h) { | |||
365 | checkobjrefN(g, hgc, h->metatable); | 365 | checkobjrefN(g, hgc, h->metatable); |
366 | for (i = 0; i < asize; i++) { | 366 | for (i = 0; i < asize; i++) { |
367 | TValue aux; | 367 | TValue aux; |
368 | arr2obj(h, i + 1, &aux); | 368 | arr2obj(h, i, &aux); |
369 | checkvalref(g, hgc, &aux); | 369 | checkvalref(g, hgc, &aux); |
370 | } | 370 | } |
371 | for (n = gnode(h, 0); n < limit; n++) { | 371 | for (n = gnode(h, 0); n < limit; n++) { |
@@ -1010,7 +1010,7 @@ static int table_query (lua_State *L) { | |||
1010 | } | 1010 | } |
1011 | else if (cast_uint(i) < asize) { | 1011 | else if (cast_uint(i) < asize) { |
1012 | lua_pushinteger(L, i); | 1012 | lua_pushinteger(L, i); |
1013 | arr2obj(t, i + 1, s2v(L->top.p)); | 1013 | arr2obj(t, i, s2v(L->top.p)); |
1014 | api_incr_top(L); | 1014 | api_incr_top(L); |
1015 | lua_pushnil(L); | 1015 | lua_pushnil(L); |
1016 | } | 1016 | } |