diff --git a/lib/soft386/opcodes.c b/lib/soft386/opcodes.c index bcc389b6488..33b7852afb7 100644 --- a/lib/soft386/opcodes.c +++ b/lib/soft386/opcodes.c @@ -3757,18 +3757,19 @@ SOFT386_OPCODE_HANDLER(Soft386OpcodePushImm) /* Make sure this is the right instruction */ ASSERT(Opcode == 0x68); - if (State->PrefixFlags == SOFT386_PREFIX_OPSIZE) - { - /* The OPSIZE prefix toggles the size */ - Size = !Size; - } - else + if (State->PrefixFlags & SOFT386_PREFIX_LOCK) { /* Invalid prefix */ Soft386Exception(State, SOFT386_EXCEPTION_UD); return FALSE; } + if (State->PrefixFlags & SOFT386_PREFIX_OPSIZE) + { + /* The OPSIZE prefix toggles the size */ + Size = !Size; + } + if (Size) { ULONG Data;