From 8a4b68688179de4aa05496efb5b796964941fae8 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 20 Sep 2020 10:51:04 +0300 Subject: [PATCH] - fixed constant propagation for operator && in ZScript https://forum.zdoom.org/viewtopic.php?t=69912 --- src/common/scripting/backend/codegen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/scripting/backend/codegen.cpp b/src/common/scripting/backend/codegen.cpp index 1c9209c58..0ec83f20a 100644 --- a/src/common/scripting/backend/codegen.cpp +++ b/src/common/scripting/backend/codegen.cpp @@ -4282,13 +4282,13 @@ FxExpression *FxBinaryLogical::Resolve(FCompileContext& ctx) { if (b_left==0 || b_right==0) { - FxExpression *x = new FxConstant(true, ScriptPosition); + FxExpression *x = new FxConstant(false, ScriptPosition); delete this; return x; } else if (b_left==1 && b_right==1) { - FxExpression *x = new FxConstant(false, ScriptPosition); + FxExpression *x = new FxConstant(true, ScriptPosition); delete this; return x; }