From 114f5a3c92edbcd6f2c87cfc2678d2f960741a14 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Wed, 28 Oct 2020 13:21:42 -0700 Subject: [PATCH] X86 GetTarget fix --- IDEHelper/X86.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IDEHelper/X86.cpp b/IDEHelper/X86.cpp index f469d520..0c9cccc3 100644 --- a/IDEHelper/X86.cpp +++ b/IDEHelper/X86.cpp @@ -384,7 +384,7 @@ uint32 X86Instr::GetTarget(Debugger* debugger, X86CPURegisters* registers) int opIdx = 0; auto operand = mMCInst.getOperand(0); - if ((instDesc.OpInfo[0].OperandType == MCOI::OPERAND_REGISTER) && (instDesc.OpInfo[4].OperandType == MCOI::OPERAND_MEMORY)) + if ((mMCInst.getNumOperands() >= 5) && (instDesc.OpInfo[0].OperandType == MCOI::OPERAND_REGISTER) && (instDesc.OpInfo[4].OperandType == MCOI::OPERAND_MEMORY)) { opIdx = 4; operand = mMCInst.getOperand(opIdx);