mirror of https://github.com/x64dbg/zydis
fix underflow
This commit is contained in:
parent
9f0eae62c1
commit
7c4e7d7daf
|
@ -4534,14 +4534,17 @@ static ZydisStatus ZydisDecodeInstruction(ZydisDecoderContext* context,
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ZYDIS_CHECK(ZydisDecodeOperands(context, instruction, definition));
|
ZYDIS_CHECK(ZydisDecodeOperands(context, instruction, definition));
|
||||||
const ZydisRegister reg =
|
if (instruction->operandCount)
|
||||||
instruction->operands[instruction->operandCount - 1].reg.value;
|
{
|
||||||
if ((reg == ZYDIS_REGISTER_FLAGS ) || (reg == ZYDIS_REGISTER_EFLAGS) ||
|
const ZydisRegister reg =
|
||||||
(reg == ZYDIS_REGISTER_RFLAGS))
|
instruction->operands[instruction->operandCount - 1].reg.value;
|
||||||
{
|
if ((reg == ZYDIS_REGISTER_FLAGS) || (reg == ZYDIS_REGISTER_EFLAGS) ||
|
||||||
ZydisSetAccessedFlags(instruction, definition);
|
(reg == ZYDIS_REGISTER_RFLAGS))
|
||||||
}
|
{
|
||||||
|
ZydisSetAccessedFlags(instruction, definition);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ZYDIS_STATUS_SUCCESS;
|
return ZYDIS_STATUS_SUCCESS;
|
||||||
|
|
Loading…
Reference in New Issue