Skip to content

Commit 9f95009

Browse files
committed
Fixed exception when multiple non-file scripts are loaded with the same content
1 parent e777be2 commit 9f95009

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

LuaDkmDebuggerComponent/LocalComponent.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3519,7 +3519,8 @@ void RegisterScriptBuffer(DkmProcess process, LuaLocalProcessData processData, u
35193519

35203520
scriptName = $"unnamed_{processData.unnamedScriptId++}";
35213521

3522-
stateSymbols.unnamedScriptMapping.Add(badScriptName, scriptName);
3522+
if (!stateSymbols.unnamedScriptMapping.ContainsKey(badScriptName))
3523+
stateSymbols.unnamedScriptMapping.Add(badScriptName, scriptName);
35233524
}
35243525
}
35253526
else

0 commit comments

Comments
 (0)