From e7ff1574efc0d69ba39c6e5acf27a1215a764048 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 15 Oct 2010 15:51:59 +0000 Subject: [PATCH] M4: Fixed OP_NOT and OP_COMP behavior again (thanks wjp) svn-id: r53505 --- engines/m4/mads_logic.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/m4/mads_logic.cpp b/engines/m4/mads_logic.cpp index 7eb8f900a8e..2d4a581abe7 100644 --- a/engines/m4/mads_logic.cpp +++ b/engines/m4/mads_logic.cpp @@ -658,12 +658,12 @@ void MadsSceneLogic::execute(uint32 subOffset) { case OP_NOT: // logical nots top item on stack param = stack.pop().get(); - stack.push(ScriptVar((uint32)!(param & 0xffff))); + stack.push(ScriptVar((uint32)(!param) & 0xffff)); break; case OP_COMP: // complements top item on stack param = stack.pop().get(); - stack.push(ScriptVar(~(param & 0xffff))); + stack.push(ScriptVar((~param) & 0xffff)); break; case OP_NEG: // negates top item on stack