From 1b45e967b4dcb234551c2a731147b111584f4145 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 25 Jan 1999 10:30:11 -0200 Subject: table entries with ref=null always have val=null too. --- lbuiltin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lbuiltin.c') diff --git a/lbuiltin.c b/lbuiltin.c index 8526ae27..f67059ca 100644 --- a/lbuiltin.c +++ b/lbuiltin.c @@ -1,5 +1,5 @@ /* -** $Id: lbuiltin.c,v 1.45 1999/01/04 17:34:49 roberto Exp roberto $ +** $Id: lbuiltin.c,v 1.46 1999/01/22 18:46:11 roberto Exp roberto $ ** Built-in functions ** See Copyright Notice in lua.h */ @@ -348,7 +348,7 @@ static void luaB_foreach (void) { luaD_checkstack(3); /* for f, ref, and val */ for (i=0; inhash; i++) { Node *nd = &(a->node[i]); - if (ttype(ref(nd)) != LUA_T_NIL && ttype(val(nd)) != LUA_T_NIL) { + if (ttype(val(nd)) != LUA_T_NIL) { *(L->stack.top++) = *f; *(L->stack.top++) = *ref(nd); *(L->stack.top++) = *val(nd); -- cgit v1.2.3-55-g6feb