From 5dc39a96241e9d676bc48081e91bc9079ce9f10f Mon Sep 17 00:00:00 2001 From: QiMing <1796728809@qq.com> Date: Mon, 23 Mar 2026 00:45:30 +0800 Subject: [PATCH] fix: Because the for loop variable in lua5.5 cannot be modified, the generated lldebugger.lua fails to start with an error. --- debugger/sourcemap.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debugger/sourcemap.ts b/debugger/sourcemap.ts index 96da419..3199a86 100644 --- a/debugger/sourcemap.ts +++ b/debugger/sourcemap.ts @@ -206,8 +206,8 @@ export namespace SourceMap { const scriptRootsStr = os.getenv(scriptRootsEnv); if (scriptRootsStr) { for (let [path] of scriptRootsStr.gmatch("[^;]+")) { - path = Path.format(path) + Path.separator; - table.insert(scriptRoots, path); + const formattedPath = Path.format(path) + Path.separator; + table.insert(scriptRoots, formattedPath); } } }