fix compiling error in MS VS2015 (#869)

for issue #868
This commit is contained in:
noword 2017-04-26 09:10:44 +08:00 committed by Nguyen Anh Quynh
parent c8336e0add
commit 22d762085c
1 changed files with 1 additions and 1 deletions

View File

@ -1159,7 +1159,7 @@ static void printPostIdxImm8s4Operand(MCInst *MI, unsigned OpNum, SStream *O)
} }
if (MI->csh->detail) { if (MI->csh->detail) {
int v = (Imm & 256) ? ((Imm & 0xff) << 2) : -((Imm & 0xff) << 2); int v = (Imm & 256) ? ((Imm & 0xff) << 2) : -((((int)Imm) & 0xff) << 2);
MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count].type = ARM_OP_IMM; MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count].type = ARM_OP_IMM;
MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count].imm = v; MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count].imm = v;
MI->flat_insn->detail->arm.op_count++; MI->flat_insn->detail->arm.op_count++;