From b21dd64d892a26563ab27de81e98def0807ddc2b Mon Sep 17 00:00:00 2001 From: PatrickvL Date: Thu, 16 Nov 2017 14:12:50 +0100 Subject: [PATCH] EmuX86_SetFlag : Corrected bool 0/1 conversion to all-zero / all-one bits --- src/CxbxKrnl/EmuX86.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CxbxKrnl/EmuX86.cpp b/src/CxbxKrnl/EmuX86.cpp index de679e77a..b2fd55f63 100644 --- a/src/CxbxKrnl/EmuX86.cpp +++ b/src/CxbxKrnl/EmuX86.cpp @@ -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(value) ^ e->ContextRecord->EFlags) & (1 << flag); } bool EmuX86_Opcode_AND(LPEXCEPTION_POINTERS e, _DInst& info)