mirror of https://github.com/x64dbg/zydis
Minor refactorings
This commit is contained in:
parent
38c99667c4
commit
585fa7035a
|
@ -3494,7 +3494,7 @@ static void ZydisSetEffectiveAddressWidth(ZydisDecoderContext* context,
|
||||||
ZYDIS_ASSERT(context);
|
ZYDIS_ASSERT(context);
|
||||||
ZYDIS_ASSERT(instruction);
|
ZYDIS_ASSERT(instruction);
|
||||||
|
|
||||||
ZydisBool hasOverride = definition->acceptsAddressSizeOverride &&
|
const ZydisBool hasOverride = definition->acceptsAddressSizeOverride &&
|
||||||
(instruction->attributes & ZYDIS_ATTRIB_HAS_ADDRESSSIZE);
|
(instruction->attributes & ZYDIS_ATTRIB_HAS_ADDRESSSIZE);
|
||||||
|
|
||||||
switch (context->decoder->addressWidth)
|
switch (context->decoder->addressWidth)
|
||||||
|
|
|
@ -50,7 +50,7 @@ ZydisStatus ZydisCalcAbsoluteAddress(const ZydisDecodedInstruction* instruction,
|
||||||
}
|
}
|
||||||
if (operand->mem.base == ZYDIS_REGISTER_EIP)
|
if (operand->mem.base == ZYDIS_REGISTER_EIP)
|
||||||
{
|
{
|
||||||
*address = (ZydisU64)((ZydisU32)instruction->instrAddress + instruction->length +
|
*address = ((ZydisU32)instruction->instrAddress + instruction->length +
|
||||||
(ZydisU32)operand->mem.disp.value);
|
(ZydisU32)operand->mem.disp.value);
|
||||||
return ZYDIS_STATUS_SUCCESS;
|
return ZYDIS_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue