summaryrefslogtreecommitdiff
path: root/disasm.c
diff options
context:
space:
mode:
authorKeith Kanios <spook@dynatos.net>2007-04-14 00:10:59 +0000
committerKeith Kanios <spook@dynatos.net>2007-04-14 00:10:59 +0000
commit93f2e9a5a1c46c3203a9df0933301f42b2b88eb9 (patch)
tree506f66150034666ec42b6da902d721dde96a7f88 /disasm.c
parent0899e21289fac4e82776ec3dd0d295a6b8221790 (diff)
downloadnasm-93f2e9a5a1c46c3203a9df0933301f42b2b88eb9.tar.gz
nasm-93f2e9a5a1c46c3203a9df0933301f42b2b88eb9.tar.bz2
nasm-93f2e9a5a1c46c3203a9df0933301f42b2b88eb9.zip
c99 printf/fprintf compliance.
Diffstat (limited to 'disasm.c')
-rw-r--r--disasm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/disasm.c b/disasm.c
index d63dc25..d2d9d91 100644
--- a/disasm.c
+++ b/disasm.c
@@ -789,11 +789,11 @@ int32_t disasm(uint8_t *data, char *output, int outbufsize, int segsize,
snprintf(output + slen, outbufsize - slen, "short ");
}
slen +=
- snprintf(output + slen, outbufsize - slen, "0x%lx",
+ snprintf(output + slen, outbufsize - slen, "0x%"PRIx64"",
ins.oprs[i].offset);
} else if (!(MEM_OFFS & ~(*p)->opd[i])) {
slen +=
- snprintf(output + slen, outbufsize - slen, "[%s%s%s0x%lx]",
+ snprintf(output + slen, outbufsize - slen, "[%s%s%s0x%"PRIx64"]",
((const char*)segover ? (const char*)segover : ""), /* placate type mistmatch warning */
((const char*)segover ? ":" : ""), /* by using (const char*) instead of uint8_t* */
(ins.oprs[i].addr_size ==
@@ -859,19 +859,19 @@ int32_t disasm(uint8_t *data, char *output, int outbufsize, int segsize,
sign = '-';
}
slen +=
- snprintf(output + slen, outbufsize - slen, "%c0x%lx",
+ snprintf(output + slen, outbufsize - slen, "%c0x%"PRIx64"",
sign, ins.oprs[i].offset);
} else if (ins.oprs[i].segment & SEG_DISP16) {
if (started)
output[slen++] = '+';
slen +=
- snprintf(output + slen, outbufsize - slen, "0x%lx",
+ snprintf(output + slen, outbufsize - slen, "0x%"PRIx64"",
ins.oprs[i].offset);
} else if (ins.oprs[i].segment & SEG_DISP32) {
if (started)
output[slen++] = '+';
slen +=
- snprintf(output + slen, outbufsize - slen, "0x%lx",
+ snprintf(output + slen, outbufsize - slen, "0x%"PRIx64"",
ins.oprs[i].offset);
}
output[slen++] = ']';