mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2025-04-10 19:15:14 +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():
|
* DecodeSigned16():
|
||||||
*
|
*
|
||||||
* Predecodes the SIMM field for us. If do_unsigned, it is printed as an
|
* 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)
|
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
|
else // print as signed 16 bits
|
||||||
{
|
{
|
||||||
if (s < 0)
|
if (s < 0)
|
||||||
{
|
sprintf(outbuf, "-0x%02X", -s);
|
||||||
s *= -1;
|
|
||||||
sprintf(outbuf, "-0x%04X", s);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
sprintf(outbuf, "0x%04X",s);
|
sprintf(outbuf, "0x%02X",s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue