aboutsummaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/hash.c b/hash.c
index 5ff64c84..64b9b313 100644
--- a/hash.c
+++ b/hash.c
@@ -3,7 +3,7 @@
3** hash manager for lua 3** hash manager for lua
4*/ 4*/
5 5
6char *rcs_hash="$Id: hash.c,v 2.42 1997/05/08 20:43:30 roberto Exp roberto $"; 6char *rcs_hash="$Id: hash.c,v 2.43 1997/05/14 18:38:29 roberto Exp roberto $";
7 7
8 8
9#include "luamem.h" 9#include "luamem.h"
@@ -327,6 +327,11 @@ void lua_next (void)
327 t = avalue(luaI_Address(o)); 327 t = avalue(luaI_Address(o));
328 if (lua_isnil(r)) 328 if (lua_isnil(r))
329 hashnext(t, 0); 329 hashnext(t, 0);
330 else 330 else {
331 hashnext(t, present(t, luaI_Address(r))+1); 331 int i = present(t, luaI_Address(r));
332 Node *n = node(t, i);
333 luaL_arg_check(ttype(ref(n))!=LUA_T_NIL && ttype(val(n))!=LUA_T_NIL,
334 2, "key not found");
335 hashnext(t, i+1);
336 }
332} 337}