diff options
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 1.52 1999/10/07 19:04:30 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.53 1999/10/11 16:13:11 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -422,11 +422,11 @@ const char *lua_nextvar (const char *varname) { | |||
422 | 422 | ||
423 | 423 | ||
424 | int luaA_next (const Hash *t, int i) { | 424 | int luaA_next (const Hash *t, int i) { |
425 | int tsize = nhash(t); | 425 | int tsize = t->size; |
426 | for (; i<tsize; i++) { | 426 | for (; i<tsize; i++) { |
427 | Node *n = node(t, i); | 427 | Node *n = node(t, i); |
428 | if (ttype(val(n)) != LUA_T_NIL) { | 428 | if (ttype(val(n)) != LUA_T_NIL) { |
429 | luaA_pushobject(ref(n)); | 429 | luaA_pushobject(key(n)); |
430 | luaA_pushobject(val(n)); | 430 | luaA_pushobject(val(n)); |
431 | return i+1; /* index to be used next time */ | 431 | return i+1; /* index to be used next time */ |
432 | } | 432 | } |