Debugger: Fixed UI stripping away $ signs in breakpoint condition field

This commit is contained in:
Sour 2018-02-23 09:09:13 -05:00
parent 75043a1675
commit c0c301d4c6

View file

@ -156,10 +156,12 @@ namespace Mesen.GUI.Forms
if(kvp.Value is TextBox) {
object value = kvp.Value.Text;
NumberStyles numberStyle = format == eNumberFormat.Decimal ? NumberStyles.Integer : NumberStyles.HexNumber;
if(field.FieldType != typeof(string)) {
value = ((string)value).Trim().Replace("$", "").Replace("0x", "");
if(field.FieldType != typeof(string) && string.IsNullOrWhiteSpace((string)value)) {
if(string.IsNullOrWhiteSpace((string)value)) {
value = "0";
}
}
if(field.FieldType == typeof(UInt32)) {
value = (object)UInt32.Parse((string)value, numberStyle);
} else if(field.FieldType == typeof(Int32)) {