Ram Search - with the Diff column displayed, don't throw exceptions, Fixes #637. The Diff column still has issues with 4 byte watches though, but this fixes unending exceptions at least
This commit is contained in:
parent
ab0b78f143
commit
3a36835af2
|
@ -232,7 +232,7 @@ namespace BizHawk.Client.Common
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
string diff = string.Empty;
|
string diff = string.Empty;
|
||||||
byte diffVal = Convert.ToByte(_value - _previous);
|
int diffVal = _value - _previous;
|
||||||
if (diffVal > 0)
|
if (diffVal > 0)
|
||||||
{
|
{
|
||||||
diff = "+";
|
diff = "+";
|
||||||
|
@ -242,7 +242,7 @@ namespace BizHawk.Client.Common
|
||||||
diff = "-";
|
diff = "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Format("{0}{1}", diff, FormatValue(diffVal));
|
return string.Format("{0}{1}", diff, FormatValue((byte)Math.Abs(diffVal)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -245,7 +245,18 @@ namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return FormatValue((ushort)(_previous - _value));
|
string diff = string.Empty;
|
||||||
|
int diffVal = _value - _previous;
|
||||||
|
if (diffVal > 0)
|
||||||
|
{
|
||||||
|
diff = "+";
|
||||||
|
}
|
||||||
|
else if (diffVal < 0)
|
||||||
|
{
|
||||||
|
diff = "-";
|
||||||
|
}
|
||||||
|
|
||||||
|
return string.Format("{0}{1}", diff, FormatValue((ushort)Math.Abs(diffVal)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue