Skip to content

Commit

Permalink
Use OS independent printf formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rot127 committed Jul 22, 2023
1 parent d8409ff commit 32ba55a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cstool/cstool_arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ void print_insn_detail_arm(csh handle, cs_insn *ins)
case ARM_OP_IMM: {
bool neg_imm = op->imm < 0;
if (neg_imm)
printf("\t\toperands[%u].type: IMM = -0x%lx\n", i, -(op->imm));
printf("\t\toperands[%u].type: IMM = -0x%" PRIx64 "\n", i, -(op->imm));
else
printf("\t\toperands[%u].type: IMM = 0x%lx\n", i, op->imm);
printf("\t\toperands[%u].type: IMM = 0x%" PRIx64 "\n", i, op->imm);
break;
}
case ARM_OP_PRED:
Expand Down Expand Up @@ -64,10 +64,10 @@ void print_insn_detail_arm(csh handle, cs_insn *ins)

break;
case ARM_OP_PIMM:
printf("\t\toperands[%u].type: P-IMM = %u\n", i, op->imm);
printf("\t\toperands[%u].type: P-IMM = %" PRIu64 "\n", i, op->imm);
break;
case ARM_OP_CIMM:
printf("\t\toperands[%u].type: C-IMM = %u\n", i, op->imm);
printf("\t\toperands[%u].type: C-IMM = %" PRIu64 "\n", i, op->imm);
break;
case ARM_OP_SETEND:
printf("\t\toperands[%u].type: SETEND = %s\n", i, op->setend == ARM_SETEND_BE? "be" : "le");
Expand Down

0 comments on commit 32ba55a

Please sign in to comment.