From e40470bbe1eeed7bdc15dcf51226e374453c1942 Mon Sep 17 00:00:00 2001 From: sharmander Date: Sat, 7 Oct 2023 08:42:10 -0700 Subject: [PATCH] Fix return value of Get function when a result does not yet exist for the address. (#5768) --- src/ARMeilleure/Diagnostics/Symbols.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ARMeilleure/Diagnostics/Symbols.cs b/src/ARMeilleure/Diagnostics/Symbols.cs index bb2f5cef5d..d857c079f5 100644 --- a/src/ARMeilleure/Diagnostics/Symbols.cs +++ b/src/ARMeilleure/Diagnostics/Symbols.cs @@ -34,7 +34,6 @@ namespace ARMeilleure.Diagnostics public static string Get(ulong address) { - if (_symbols.TryGetValue(address, out string result)) { return result; @@ -57,7 +56,8 @@ namespace ARMeilleure.Diagnostics resultBuilder.Append($"+{rem}"); } - _symbols.TryAdd(address, resultBuilder.ToString()); + result = resultBuilder.ToString(); + _symbols.TryAdd(address, result); return result; }