summaryrefslogtreecommitdiffhomepage
path: root/vm.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-02-25 22:50:19 +0100
committerJo-Philipp Wich <jo@mein.io>2021-02-25 22:50:19 +0100
commite416740e189f4fec06da2db5ebcd30092eb50270 (patch)
treee942de67dabc7570d833e2db4e52f2d2abacec9b /vm.c
parent679270fd3afa93cca84ab31b5041922037fec0c5 (diff)
vm: use portable printf format for pointer differences
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm.c b/vm.c
index e5cfdb5..2889cce 100644
--- a/vm.c
+++ b/vm.c
@@ -268,7 +268,7 @@ uc_vm_frame_dump(uc_vm *vm, uc_callframe *frame)
uc_upvalref *ref;
size_t i;
- fprintf(stderr, " [*] CALLFRAME[%lx]\n",
+ fprintf(stderr, " [*] CALLFRAME[%zx]\n",
frame - vm->callframes.entries);
fprintf(stderr, " |- stackframe %zu/%zu\n",
@@ -553,7 +553,7 @@ uc_dump_insn(uc_vm *vm, uint8_t *pos, enum insn_type insn)
last_srcpos = srcpos;
}
- fprintf(stderr, "%08lx %s", pos - chunk->entries, insn_names[insn]);
+ fprintf(stderr, "%08zx %s", pos - chunk->entries, insn_names[insn]);
switch (insn_defs[insn].operand_bytes) {
case 0: