]> git.tdb.fi Git - libs/gl.git/commitdiff
Write access can't get into an unary operator from outside
authorMikko Rasa <tdb@tdb.fi>
Mon, 8 Nov 2021 13:27:43 +0000 (15:27 +0200)
committerMikko Rasa <tdb@tdb.fi>
Mon, 8 Nov 2021 13:27:43 +0000 (15:27 +0200)
source/glsl/optimize.cpp

index c9d3c33a543830f3618a6d2e337d92519026de6c..96a75d603d6db5bdaaae35de41bbe16fb938cecf 100644 (file)
@@ -402,7 +402,7 @@ void ExpressionInliner::visit(Swizzle &swizzle)
 
 void ExpressionInliner::visit(UnaryExpression &unary)
 {
-       SetFlag set_write(access_write, access_write || unary.oper->token[1]=='+' || unary.oper->token[1]=='-');
+       SetFlag set_write(access_write, (unary.oper->token[1]=='+' || unary.oper->token[1]=='-'));
        visit(unary.expression);
        r_trivial = false;
 }