aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/ltests.c b/ltests.c
index 4b8fcd01..d012df8b 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 1.76 2001/03/09 18:05:05 roberto Exp roberto $ 2** $Id: ltests.c,v 1.77 2001/03/26 14:31:49 roberto Exp roberto $
3** Internal Module for Debugging of the Lua Implementation 3** Internal Module for Debugging of the Lua Implementation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -337,9 +337,16 @@ static int table_query (lua_State *L) {
337 return 2; 337 return 2;
338 } 338 }
339 else if (i < t->size) { 339 else if (i < t->size) {
340 TObject o; 340 if (ttype(val(node(t, i))) != LUA_TNIL ||
341 setkey2obj(&o, &t->node[i]); 341 ttype_key(node(t, i)) == LUA_TNIL ||
342 luaA_pushobject(L, &o); 342 ttype_key(node(t, i)) == LUA_TNUMBER ||
343 tsvalue_key(node(t, i)) != NULL) {
344 TObject o;
345 setkey2obj(&o, node(t, i));
346 luaA_pushobject(L, &o);
347 }
348 else
349 lua_pushstring(L, "<undef>");
343 luaA_pushobject(L, &t->node[i].val); 350 luaA_pushobject(L, &t->node[i].val);
344 if (t->node[i].next) { 351 if (t->node[i].next) {
345 lua_pushnumber(L, t->node[i].next - t->node); 352 lua_pushnumber(L, t->node[i].next - t->node);