From: Mike Pall Date: Sun, 9 Mar 2025 22:11:05 +0000 (+0100) Subject: Fix handling of nil value markers in template tables. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7db2d1b12a5416eed405f8112e1f45babfe60300;p=thirdparty%2FLuaJIT.git Fix handling of nil value markers in template tables. Thanks to Peter Cawley. #1348 #1155 --- diff --git a/src/lj_bcwrite.c b/src/lj_bcwrite.c index d5e10ab2..ec6f13c8 100644 --- a/src/lj_bcwrite.c +++ b/src/lj_bcwrite.c @@ -186,7 +186,7 @@ static void bcwrite_ktab(BCWriteCtx *ctx, char *p, const GCtab *t) } else { MSize i = nhash; for (;; node--) - if (!tvisnil(&node->key)) { + if (!tvisnil(&node->val)) { bcwrite_ktabk(ctx, &node->key, 0); bcwrite_ktabk(ctx, &node->val, 1); if (--i == 0) break;