From e0ac148e7622f117abfbbfa291f599da2400fbc1 Mon Sep 17 00:00:00 2001 From: Isotarge Date: Fri, 22 Jul 2016 02:15:43 +0930 Subject: [PATCH] Fix #669 - Fixes RAM Watch, RAM Search, and RAM Poke usability issue w/negative numbers. - Bonus fix for unhandled exception when entering . in to the specific value box --- BizHawk.Client.EmuHawk/tools/Watch/WatchValueBox.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/Watch/WatchValueBox.cs b/BizHawk.Client.EmuHawk/tools/Watch/WatchValueBox.cs index f0733dcef5..9a8757a4b0 100644 --- a/BizHawk.Client.EmuHawk/tools/Watch/WatchValueBox.cs +++ b/BizHawk.Client.EmuHawk/tools/Watch/WatchValueBox.cs @@ -282,7 +282,7 @@ namespace BizHawk.Client.EmuHawk if (e.KeyChar == '.') { - if (Text.Contains(".")) + if (Text.Contains(".") && !SelectedText.Contains(".")) { e.Handled = true; return; @@ -290,7 +290,7 @@ namespace BizHawk.Client.EmuHawk } else if (e.KeyChar == '-') { - if (Text.Contains("-")) + if (Text.Contains("-") && !SelectedText.Contains("-")) { e.Handled = true; return; @@ -686,7 +686,7 @@ namespace BizHawk.Client.EmuHawk case DisplayType.Float: if (Text.IsFloat()) { - if (Text == "-") + if (Text == "-" || Text == ".") return 0; float val = float.Parse(Text); var bytes = BitConverter.GetBytes(val);