From 2a89a9f1d82f63607104705d4ffdf019cdab4f46 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 7 Feb 2016 21:36:02 +0100 Subject: [PATCH] - fixed incorrect code generation for '||' operator (at least I hope it's fixed now.) --- src/thingdef/thingdef_expression.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/thingdef/thingdef_expression.cpp b/src/thingdef/thingdef_expression.cpp index 53da5d42c..789e2760b 100644 --- a/src/thingdef/thingdef_expression.cpp +++ b/src/thingdef/thingdef_expression.cpp @@ -1697,7 +1697,7 @@ ExpEmit FxBinaryLogical::Emit(VMFunctionBuilder *build) else { assert(Operator == TK_OrOr); - build->Emit(OP_EQ_K, 0, op1.RegNum, zero); + build->Emit(OP_EQ_K, 1, op1.RegNum, zero); // If op1 is not 0, skip evaluation of op2. size_t patchspot = build->Emit(OP_JMP, 0, 0, 0);