aboutsummaryrefslogtreecommitdiff
path: root/src/lj_tab.c
diff options
context:
space:
mode:
authorMike Pall <mike>2025-03-11 23:04:30 +0100
committerMike Pall <mike>2025-03-11 23:04:30 +0100
commit538a82133ad6fddfd0ca64de167c4aca3bc1a2da (patch)
tree22fd80543291b6b51ba9a6f841719bab7ed7b3bd /src/lj_tab.c
parent84cb21ffaf648b472ff3884556e2c413e8abe179 (diff)
downloadluajit-v2.1.tar.gz
luajit-v2.1.tar.bz2
luajit-v2.1.zip
Change handling of nil value markers in template tables.HEADv2.1
Reported by Bernhard M. Wiedemann. #1348 #1155 Fixes from Peter Cawley, Christian Clason, Lewis Russell.
Diffstat (limited to 'src/lj_tab.c')
-rw-r--r--src/lj_tab.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lj_tab.c b/src/lj_tab.c
index 2d080552..62e33611 100644
--- a/src/lj_tab.c
+++ b/src/lj_tab.c
@@ -194,6 +194,7 @@ GCtab * LJ_FASTCALL lj_tab_dup(lua_State *L, const GCtab *kt)
194 Node *next = nextnode(kn); 194 Node *next = nextnode(kn);
195 /* Don't use copyTV here, since it asserts on a copy of a dead key. */ 195 /* Don't use copyTV here, since it asserts on a copy of a dead key. */
196 n->val = kn->val; n->key = kn->key; 196 n->val = kn->val; n->key = kn->key;
197 if (tvistab(&n->val)) setnilV(&n->val); /* Replace nil value marker. */
197 setmref(n->next, next == NULL? next : (Node *)((char *)next + d)); 198 setmref(n->next, next == NULL? next : (Node *)((char *)next + d));
198 } 199 }
199 } 200 }