From 7db2d1b12a5416eed405f8112e1f45babfe60300 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Sun, 9 Mar 2025 23:11:05 +0100 Subject: Fix handling of nil value markers in template tables. Thanks to Peter Cawley. #1348 #1155 --- src/lj_bcwrite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3-55-g6feb