EmuX86_SetFlag : Corrected bool 0/1 conversion to all-zero / all-one bits

This commit is contained in:
PatrickvL 2017-11-16 14:12:50 +01:00
parent f2955a5080
commit b21dd64d89
1 changed files with 1 additions and 1 deletions

View File

@ -768,7 +768,7 @@ bool EmuX86_Opcode_MOVZX(LPEXCEPTION_POINTERS e, _DInst& info)
inline void EmuX86_SetFlag(LPEXCEPTION_POINTERS e, unsigned flag, bool value)
{
e->ContextRecord->EFlags ^= (!value ^ e->ContextRecord->EFlags) & (1 << flag);
e->ContextRecord->EFlags ^= (!static_cast<uint32_t>(value) ^ e->ContextRecord->EFlags) & (1 << flag);
}
bool EmuX86_Opcode_AND(LPEXCEPTION_POINTERS e, _DInst& info)