]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Force fallback source name for stripped bytecode.
authorMike Pall <mike>
Mon, 16 Dec 2024 13:30:10 +0000 (14:30 +0100)
committerMike Pall <mike>
Mon, 16 Dec 2024 13:30:10 +0000 (14:30 +0100)
Reported by Lyrth. #1319

src/lj_bcread.c

index ad6b2a5cefd4e5acc40922936b69fff8af3812ee..f4caa9089310ba6cd41a3614058970ff44c4b888 100644 (file)
@@ -443,7 +443,7 @@ static int bcread_header(LexState *ls)
 #endif
   }
   if ((flags & BCDUMP_F_STRIP)) {
-    ls->chunkname = lj_str_newz(ls->L, ls->chunkarg);
+    ls->chunkname = lj_str_newz(ls->L, *ls->chunkarg == BCDUMP_HEAD1 ? "=?" : ls->chunkarg);
   } else {
     MSize len = bcread_uleb128(ls);
     bcread_need(ls, len);