- fixed constant propagation for operator && in ZScript

https://forum.zdoom.org/viewtopic.php?t=69912
This commit is contained in:
alexey.lysiuk 2020-09-20 10:51:04 +03:00
parent 89b28911dd
commit 8a4b686881

View file

@ -4282,13 +4282,13 @@ FxExpression *FxBinaryLogical::Resolve(FCompileContext& ctx)
{ {
if (b_left==0 || b_right==0) if (b_left==0 || b_right==0)
{ {
FxExpression *x = new FxConstant(true, ScriptPosition); FxExpression *x = new FxConstant(false, ScriptPosition);
delete this; delete this;
return x; return x;
} }
else if (b_left==1 && b_right==1) else if (b_left==1 && b_right==1)
{ {
FxExpression *x = new FxConstant(false, ScriptPosition); FxExpression *x = new FxConstant(true, ScriptPosition);
delete this; delete this;
return x; return x;
} }