Skip to content
Prev Previous commit
Next Next commit
unittests: posix itoa should generate uppercase hex
Just like the z88dk version does.

Signed-off-by: Mark Ryan <[email protected]>
  • Loading branch information
markdryan committed Nov 5, 2022
commit 8cacf310e603d9b9ba744d4ebd98765df77d5637
4 changes: 2 additions & 2 deletions src/peer_posix_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ void specasm_screen_flush(uint16_t peer_last_row)

int itoa(int n, char *s, unsigned char radix)
{
return sprintf(s, radix == 16 ? "%" PRIx16 : "%" PRId16, (int16_t)n);
return sprintf(s, radix == 16 ? "%" PRIX16 : "%" PRId16, (int16_t)n);
}
int utoa(int n, char *s, unsigned char radix)
{
return sprintf(s, radix == 16 ? "%" PRIx16 : "%" PRIu16, (uint16_t)n);
return sprintf(s, radix == 16 ? "%" PRIX16 : "%" PRIu16, (uint16_t)n);
}
Loading