From 4834d196f73c7899e5b243382cb98ac71e69b6d1 Mon Sep 17 00:00:00 2001 From: Rot127 <45763064+Rot127@users.noreply.github.com> Date: Mon, 23 Oct 2023 13:52:35 +0000 Subject: [PATCH] Fix off by one error. (#2180) --- arch/ARM/ARMMapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/ARM/ARMMapping.c b/arch/ARM/ARMMapping.c index 57032afec2..aaeec587fd 100644 --- a/arch/ARM/ARMMapping.c +++ b/arch/ARM/ARMMapping.c @@ -1369,7 +1369,7 @@ static void add_cs_detail_general(MCInst *MI, arm_op_group op_group, unsigned int imm3 = MCInst_getOpVal(MI, OpNum + 2); unsigned ShOff = ARM_AM_getAM2Offset(imm3); ARM_AM_AddrOpc subtracted = ARM_AM_getAM2Op(imm3); - if (!MCOperand_getReg(MCInst_getOperand(MI, OpNum + 2)) && + if (!MCOperand_getReg(MCInst_getOperand(MI, OpNum + 1)) && ShOff) { ARM_get_detail_op(MI, 0)->shift.type = (arm_shifter)subtracted;