1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-14 16:33:00 +00:00

Fix format strings to properly format uintptr_t

This commit is contained in:
nyanpasu64 2022-03-05 03:30:14 -08:00 committed by mrdudz
parent 190e04b0ce
commit 8afbf3f5ff

View File

@ -4403,15 +4403,15 @@ void g_defdata (unsigned flags, uintptr_t val, long offs)
switch (flags & CF_TYPEMASK) { switch (flags & CF_TYPEMASK) {
case CF_CHAR: case CF_CHAR:
AddDataLine ("\t.byte\t$%02lX", val & 0xFF); AddDataLine ("\t.byte\t$%02"PRIXPTR, val & 0xFF);
break; break;
case CF_INT: case CF_INT:
AddDataLine ("\t.word\t$%04lX", val & 0xFFFF); AddDataLine ("\t.word\t$%04"PRIXPTR, val & 0xFFFF);
break; break;
case CF_LONG: case CF_LONG:
AddDataLine ("\t.dword\t$%08lX", val & 0xFFFFFFFF); AddDataLine ("\t.dword\t$%08"PRIXPTR, val & 0xFFFFFFFF);
break; break;
default: default: