Debugger: Fixed UI crash in watch when typing an hex address without the hex prefix
This commit is contained in:
parent
effd016dc7
commit
a48e52933b
1 changed files with 5 additions and 1 deletions
|
@ -182,7 +182,11 @@ namespace Mesen.GUI.Debugger
|
|||
|
||||
if(address[0] >= '0' && address[0] <= '9' || address[0] == '$') {
|
||||
//CPU Address
|
||||
_selectedAddress = Int32.Parse(address[0] == '$' ? address.Substring(1) : address, address[0] == '$' ? NumberStyles.AllowHexSpecifier : NumberStyles.None);
|
||||
bool isHex = address[0] == '$';
|
||||
string addrString = isHex ? address.Substring(1) : address;
|
||||
if(!Int32.TryParse(addrString, isHex ? NumberStyles.AllowHexSpecifier : NumberStyles.None, null, out _selectedAddress)) {
|
||||
_selectedAddress = -1;
|
||||
}
|
||||
_selectedLabel = null;
|
||||
mnuEditInMemoryViewer.Enabled = true;
|
||||
mnuViewInDisassembly.Enabled = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue