Skip to content

Commit 419c2df

Browse files
committed
Fix bug with compound declarations
1 parent 3acc63f commit 419c2df

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

UnityShaderParser/HLSL/HLSLPrinter.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ protected void EmitExpression(OperatorPrecedence prec, Action expressionEmitter)
5959
{
6060
needsParen = true;
6161
}
62+
if (prec == OperatorPrecedence.Compound)
63+
{
64+
needsParen = true;
65+
}
6266

6367
expressionPrecedences.Push(precedence);
6468
if (needsParen) Emit("(");

0 commit comments

Comments
 (0)