Skip to content

Commit dcbec53

Browse files
catenacyberaquynh
authored andcommitted
Fixes shift for ARM memory operand (capstone-engine#1162)
Shift is for same operand as index register
1 parent 6e4c59d commit dcbec53

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/ARM/ARMInstPrinter.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2111,8 +2111,8 @@ static void printT2AddrModeSoRegOperand(MCInst *MI,
21112111
SStream_concat0(O, ", lsl ");
21122112
SStream_concat(O, "#%d", ShAmt);
21132113
if (MI->csh->detail) {
2114-
MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count - 1].shift.type = ARM_SFT_LSL;
2115-
MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count - 1].shift.value = ShAmt;
2114+
MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count].shift.type = ARM_SFT_LSL;
2115+
MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count].shift.value = ShAmt;
21162116
}
21172117
}
21182118

0 commit comments

Comments
 (0)