diff --git a/disasm-lib/disasm_x86.c b/disasm-lib/disasm_x86.c index 26a5d76..1971860 100644 --- a/disasm-lib/disasm_x86.c +++ b/disasm-lib/disasm_x86.c @@ -2157,8 +2157,7 @@ BOOL X86_GetInstruction(INSTRUCTION *Instruction, U8 *Address, U32 Flags) // If there is both a base and index register, the Result will probably be too wrong // to even guess else if (X86Instruction->HasFullDisplacement && - ((X86Instruction->HasBaseRegister && !X86Instruction->HasIndexRegister) || - (!X86Instruction->HasBaseRegister && X86Instruction->HasIndexRegister))) + (X86Instruction->HasBaseRegister != X86Instruction->HasIndexRegister)) { assert(Operand1->Length <= 0xFF); if (!X86Instruction->Scale) @@ -2199,8 +2198,7 @@ BOOL X86_GetInstruction(INSTRUCTION *Instruction, U8 *Address, U32 Flags) // If there is both a base and index register, the Result will probably be too wrong // to even guess else if (X86Instruction->HasFullDisplacement && - ((X86Instruction->HasBaseRegister && !X86Instruction->HasIndexRegister) || - (!X86Instruction->HasBaseRegister && X86Instruction->HasIndexRegister))) + (X86Instruction->HasBaseRegister != X86Instruction->HasIndexRegister)) { //DISASM_OUTPUT(("[0x%08I64X] Scale %d, displacement 0x%08I64x\n", VIRTUAL_ADDRESS, X86Instruction->Scale, X86Instruction->Displacement)); if (!X86Instruction->Scale) @@ -2294,8 +2292,7 @@ BOOL X86_GetInstruction(INSTRUCTION *Instruction, U8 *Address, U32 Flags) // If there is both a base and index register, the Result will probably be too wrong // to even guess else if (Operand->Flags & OP_GLOBAL && - ((X86Instruction->HasBaseRegister && !X86Instruction->HasIndexRegister) || - (!X86Instruction->HasBaseRegister && X86Instruction->HasIndexRegister))) + (X86Instruction->HasBaseRegister != X86Instruction->HasIndexRegister)) { DISASM_OUTPUT(("[0x%08I64X] Data reference (scale %d, size %d, displacement 0x%08I64x)\n", VIRTUAL_ADDRESS, X86Instruction->Scale, Operand->Length, X86Instruction->Displacement)); if (!X86Instruction->Scale)