diff --git a/src/thingdef/thingdef_expression.cpp b/src/thingdef/thingdef_expression.cpp index a877a4e1a..8ae850a71 100644 --- a/src/thingdef/thingdef_expression.cpp +++ b/src/thingdef/thingdef_expression.cpp @@ -1681,7 +1681,7 @@ ExpEmit FxBinaryLogical::Emit(VMFunctionBuilder *build) op2.Free(build); ExpEmit to(build, REGT_INT); - build->Emit(OP_EQ_K, 0, op2.RegNum, zero); + build->Emit(OP_EQ_K, 1, op2.RegNum, zero); build->Emit(OP_JMP, 2); build->Emit(OP_LI, to.RegNum, 1); build->Emit(OP_JMP, 1); @@ -1702,7 +1702,7 @@ ExpEmit FxBinaryLogical::Emit(VMFunctionBuilder *build) op2.Free(build); ExpEmit to(build, REGT_INT); - build->Emit(OP_EQ_K, 1, op2.RegNum, zero); + build->Emit(OP_EQ_K, 0, op2.RegNum, zero); build->Emit(OP_JMP, 2); build->Emit(OP_LI, to.RegNum, 0); build->Emit(OP_JMP, 1);