RAM Search: Fix unhandled exception

Fixes an unhandled exception when beginning to type a negative number
into the search box when display is set to float
This commit is contained in:
Isotarge 2016-03-05 08:11:08 +10:30
parent ebceb1fc73
commit 822f571621
1 changed files with 2 additions and 0 deletions

View File

@ -686,6 +686,8 @@ namespace BizHawk.Client.EmuHawk
case DisplayType.Float:
if (Text.IsFloat())
{
if (Text == "-")
return 0;
float val = float.Parse(Text);
var bytes = BitConverter.GetBytes(val);
return BitConverter.ToInt32(bytes, 0);