diff options
Diffstat (limited to 'libs/liblua/src/lgc.c')
-rw-r--r-- | libs/liblua/src/lgc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/liblua/src/lgc.c b/libs/liblua/src/lgc.c index de3f2a2155..db4df82922 100644 --- a/libs/liblua/src/lgc.c +++ b/libs/liblua/src/lgc.c @@ -1,5 +1,5 @@ /* -** $Id: lgc.c,v 2.214 2016/11/07 12:38:35 roberto Exp roberto $ +** $Id: lgc.c,v 2.215.1.2 2017/08/31 16:15:27 roberto Exp $ ** Garbage Collector ** See Copyright Notice in lua.h */ @@ -643,8 +643,9 @@ static void clearkeys (global_State *g, GCObject *l, GCObject *f) { for (n = gnode(h, 0); n < limit; n++) { if (!ttisnil(gval(n)) && (iscleared(g, gkey(n)))) { setnilvalue(gval(n)); /* remove value ... */ - removeentry(n); /* and remove entry from table */ } + if (ttisnil(gval(n))) /* is entry empty? */ + removeentry(n); /* remove entry from table */ } } } |