mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2025-02-16 17:35:39 +00:00
Fixed small bug with formatting in DecodeSigned16
This commit is contained in:
parent
2800f86935
commit
187f0016fb
|
@ -524,7 +524,7 @@ static void SPR(char *dest, unsigned spr_field)
|
|||
* DecodeSigned16():
|
||||
*
|
||||
* Predecodes the SIMM field for us. If do_unsigned, it is printed as an
|
||||
* unsigned 16-bit integer.
|
||||
* unsigned 32-bit integer.
|
||||
*/
|
||||
static void DecodeSigned16(char *outbuf, UINT32 op, BOOL do_unsigned)
|
||||
{
|
||||
|
@ -536,12 +536,9 @@ static void DecodeSigned16(char *outbuf, UINT32 op, BOOL do_unsigned)
|
|||
else // print as signed 16 bits
|
||||
{
|
||||
if (s < 0)
|
||||
{
|
||||
s *= -1;
|
||||
sprintf(outbuf, "-0x%04X", s);
|
||||
}
|
||||
sprintf(outbuf, "-0x%02X", -s);
|
||||
else
|
||||
sprintf(outbuf, "0x%04X",s);
|
||||
sprintf(outbuf, "0x%02X",s);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue