Fixed negative values shown as positive in debugger (fixes #414).

This commit is contained in:
Stephen Anthony 2019-02-14 18:32:23 -03:30
parent 481c63f980
commit 7c88c372ac
2 changed files with 10 additions and 7 deletions

View File

@ -25,13 +25,16 @@
- delayed player 1 swap
- stuffed player move
* disabled some developer options for 'Player settings'
* Disabled some developer options for 'Player settings'.
* Removed superfluous controller option 'PADDLES_IDIR'
* Removed superfluous controller option 'PADDLES_IDIR'.
* Fixed not working 7800 pause key
* Fixed not working 7800 pause key.
* Fixed 'Dancing Plate (Unknown) (PAL)' to use joystick
* Fixed display of negative values in debugger; sometimes they were
shown as positive.
* Fixed 'Dancing Plate (Unknown) (PAL)' to use joystick.
-Have fun!

View File

@ -46,10 +46,10 @@ string Base::toString(int value, Common::Base::Format outputBase)
}
case Base::F_10: // base 10: 3 or 5 bytes (depending on value)
if(value < 0x100)
std::snprintf(vToS_buf, 4, "%3d", value & 0xff);
if(value > -0x100 && value < 0x100)
std::snprintf(vToS_buf, 5, "%3d", Int16(value));
else
std::snprintf(vToS_buf, 6, "%5d", value & 0xffff);
std::snprintf(vToS_buf, 6, "%5d", value);
break;
case Base::F_10_02: // base 10: 2 digits (with leading zero)