Catch OverflowException when parsing address (hex str), resolves #1549

This commit is contained in:
YoshiRulz 2019-04-21 05:18:42 +10:00
parent ab020cfad2
commit 6f1d61420d
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 10 additions and 1 deletions

View File

@ -933,7 +933,16 @@ namespace BizHawk.Client.EmuHawk
{
if (prompt.PromptText.IsHex())
{
var addr = int.Parse(prompt.PromptText, NumberStyles.HexNumber);
int addr;
try
{
addr = int.Parse(prompt.PromptText, NumberStyles.HexNumber);
}
catch (OverflowException e)
{
//TODO repeat dialog `prompt` / show error?
return;
}
for (int index = 0; index < _searches.Count; index++)
{