arm: another fix for #446. bug reported by @uxmal

This commit is contained in:
Nguyen Anh Quynh 2015-08-19 22:36:09 +08:00
parent f938424349
commit 763ac62498
1 changed files with 2 additions and 2 deletions

View File

@ -1056,10 +1056,10 @@ static void printAM3PreOrOffsetIndexOp(MCInst *MI, unsigned Op, SStream *O,
if (MI->csh->detail) { if (MI->csh->detail) {
if (!sign) { if (!sign) {
MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count].mem.disp = (int)ImmOffs; MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count].mem.disp = -(int)ImmOffs;
MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count].subtracted = true; MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count].subtracted = true;
} else } else
MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count].mem.disp = -(int)ImmOffs; MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count].mem.disp = (int)ImmOffs;
} }
SStream_concat0(O, "]"); SStream_concat0(O, "]");