M4: Fixed OP_NOT and OP_COMP behavior again (thanks wjp)

svn-id: r53505
This commit is contained in:
Filippos Karapetis 2010-10-15 15:51:59 +00:00
parent 7f43ed3f9d
commit e7ff1574ef

View File

@ -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