aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/m4/mads_logic.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/m4/mads_logic.cpp b/engines/m4/mads_logic.cpp
index 7eb8f900a8..2d4a581abe 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