diff --git a/lib/soft386/common.inl b/lib/soft386/common.inl index f14c775e7a5..962864df259 100644 --- a/lib/soft386/common.inl +++ b/lib/soft386/common.inl @@ -647,6 +647,9 @@ Soft386ParseModRegRm(PSOFT386_STATE State, /* Add the signed offset to the address */ ModRegRm->MemoryAddress += (LONG)Offset; } + + /* Clear the top 16 bits */ + ModRegRm->MemoryAddress &= 0xFFFF0000; } return TRUE; diff --git a/lib/soft386/opgroups.c b/lib/soft386/opgroups.c index f15272296c3..503a109daed 100644 --- a/lib/soft386/opgroups.c +++ b/lib/soft386/opgroups.c @@ -705,7 +705,7 @@ SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupC7) { SOFT386_MOD_REG_RM ModRegRm; BOOLEAN OperandSize, AddressSize; - + OperandSize = AddressSize = State->SegmentRegs[SOFT386_REG_CS].Size; if (State->PrefixFlags & SOFT386_PREFIX_OPSIZE)