diff --git a/GUI.NET/Debugger/WatchManager.cs b/GUI.NET/Debugger/WatchManager.cs index 81165565..664c88c3 100644 --- a/GUI.NET/Debugger/WatchManager.cs +++ b/GUI.NET/Debugger/WatchManager.cs @@ -12,7 +12,7 @@ namespace Mesen.GUI.Debugger public static event EventHandler WatchChanged; private static List _watchEntries = new List(); private static List _previousValues = new List(); - private static Regex _arrayWatchRegex = new Regex(@"\[((\$\d+)|(\d+)|([@_a-zA-Z0-9]+))\s*,\s*(\d+)\]", RegexOptions.Compiled); + private static Regex _arrayWatchRegex = new Regex(@"\[((\$[0-9A-Fa-f]+)|(\d+)|([@_a-zA-Z0-9]+))\s*,\s*(\d+)\]", RegexOptions.Compiled); public static List WatchEntries { @@ -64,6 +64,10 @@ namespace Mesen.GUI.Debugger address = int.Parse(match.Groups[3].Value); } else { CodeLabel label = LabelManager.GetLabel(match.Groups[4].Value); + if(label == null) { + forceHasChanged = true; + return ""; + } address = label.GetRelativeAddress(); } int elemCount = int.Parse(match.Groups[5].Value);