opnsense-ports/lang/lua53/files/patch-src__lgc.c
Franco Fichtner 4a33d3ced4 lang/lua53: sync with upstream
Taken from: HardenedBSD
2017-11-18 07:44:39 +01:00

13 lines
483 B
C

--- src/lgc.c.orig 2016-12-22 13:08:50 UTC
+++ src/lgc.c
@@ -643,8 +643,9 @@ static void clearkeys (global_State *g, GCObject *l, G
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 */
}
}
}