- 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 committed by drfrag
parent 0eed9bf413
commit 86452ed684

View file

@ -4355,13 +4355,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;
}