From ab8af4693a6aa96466088c59176468d567cf8ee1 Mon Sep 17 00:00:00 2001 From: Sour Date: Thu, 31 May 2018 20:59:55 -0400 Subject: [PATCH] Debugger: Memory Tools - Fixed crash in "Add to watch" action --- GUI.NET/Debugger/Controls/ctrlHexViewer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GUI.NET/Debugger/Controls/ctrlHexViewer.cs b/GUI.NET/Debugger/Controls/ctrlHexViewer.cs index 8359ec79..486359b2 100644 --- a/GUI.NET/Debugger/Controls/ctrlHexViewer.cs +++ b/GUI.NET/Debugger/Controls/ctrlHexViewer.cs @@ -474,7 +474,7 @@ namespace Mesen.GUI.Debugger.Controls private void mnuAddToWatch_Click(object sender, EventArgs e) { - string[] toAdd = Enumerable.Range(SelectionStartAddress, SelectionEndAddress - SelectionStartAddress - 1).Select((num) => $"[${num.ToString("X4")}]").ToArray(); + string[] toAdd = Enumerable.Range(SelectionStartAddress, SelectionEndAddress - SelectionStartAddress + 1).Select((num) => $"[${num.ToString("X4")}]").ToArray(); WatchManager.AddWatch(toAdd); }