Blame SOURCES/lua-5.3.4-bug5.patch

e6e9ea
diff -up lua-5.3.4/src/lgc.c.bug5 lua-5.3.4/src/lgc.c
e6e9ea
--- lua-5.3.4/src/lgc.c.bug5	2017-10-29 20:30:18.824283152 -0400
e6e9ea
+++ lua-5.3.4/src/lgc.c	2017-10-29 20:31:12.133021523 -0400
e6e9ea
@@ -643,8 +643,9 @@ static void clearkeys (global_State *g,
e6e9ea
     for (n = gnode(h, 0); n < limit; n++) {
e6e9ea
       if (!ttisnil(gval(n)) && (iscleared(g, gkey(n)))) {
e6e9ea
         setnilvalue(gval(n));  /* remove value ... */
e6e9ea
-        removeentry(n);  /* and remove entry from table */
e6e9ea
       }
e6e9ea
+      if (ttisnil(gval(n)))  /* is entry empty? */
e6e9ea
+        removeentry(n);  /* remove entry from table */
e6e9ea
     }
e6e9ea
   }
e6e9ea
 }