Add Breakpoint dialog - fix a slight logic error

This commit is contained in:
adelikat 2015-01-18 19:08:25 +00:00
parent 515a41592c
commit f6b757e7fd
2 changed files with 5 additions and 5 deletions

View File

@ -37,14 +37,14 @@ namespace BizHawk.Client.EmuHawk
ResetText(); ResetText();
} }
private uint GetMax() public long GetMax()
{ {
if (_maxSize.HasValue) if (_maxSize.HasValue)
{ {
return (uint)_maxSize.Value; return _maxSize.Value;
} }
return (uint)(((long)1 << (4 * MaxLength)) - 1); return ((long)1 << (4 * MaxLength)) - 1;
} }
public override void ResetText() public override void ResetText()
@ -92,7 +92,7 @@ namespace BizHawk.Client.EmuHawk
var val = (uint)ToRawInt(); var val = (uint)ToRawInt();
if (val == 0) if (val == 0)
{ {
val = GetMax(); val = (uint)GetMax(); // int to long todo
} }
else else
{ {

View File

@ -50,7 +50,7 @@ namespace BizHawk.Client.EmuHawk
{ {
get get
{ {
return AddressBox.MaxLength; // int to long TODO: I think this logic was wrong (even before the int to long refactor) return AddressBox.GetMax();
} }
set set