diff options
author | Mike Pall <mike> | 2025-03-09 23:11:05 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2025-03-09 23:11:05 +0100 |
commit | 7db2d1b12a5416eed405f8112e1f45babfe60300 (patch) | |
tree | bbd29d0b21558cd0300c75ed1e8db6eb58c25f2a /src | |
parent | e0551670c99d842d30116ba3056fae000b6e315e (diff) | |
download | luajit-7db2d1b12a5416eed405f8112e1f45babfe60300.tar.gz luajit-7db2d1b12a5416eed405f8112e1f45babfe60300.tar.bz2 luajit-7db2d1b12a5416eed405f8112e1f45babfe60300.zip |
Fix handling of nil value markers in template tables.
Thanks to Peter Cawley. #1348 #1155
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_bcwrite.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
186 | } else { | 186 | } else { |
187 | MSize i = nhash; | 187 | MSize i = nhash; |
188 | for (;; node--) | 188 | for (;; node--) |
189 | if (!tvisnil(&node->key)) { | 189 | if (!tvisnil(&node->val)) { |
190 | bcwrite_ktabk(ctx, &node->key, 0); | 190 | bcwrite_ktabk(ctx, &node->key, 0); |
191 | bcwrite_ktabk(ctx, &node->val, 1); | 191 | bcwrite_ktabk(ctx, &node->val, 1); |
192 | if (--i == 0) break; | 192 | if (--i == 0) break; |