From 2f88442d7d51aed1ff597ec3df31ce12ed3b54a6 Mon Sep 17 00:00:00 2001 From: Elizabeth Figura Date: Fri, 31 May 2024 14:45:41 -0500 Subject: [PATCH] vkd3d-shader/hlsl: Always initialize $$ when parsing modifiers from an arbitrary string. This avoids spurious errors like "row_major and column_major are mutually exclusive" when an invalid modifier is used. Fixes: cf7c05f4315dd21a96f60653497c1228a38f61af --- libs/vkd3d-shader/hlsl.y | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index c120613e..a2c89b15 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -7296,6 +7296,8 @@ var_modifiers: } | var_identifier var_modifiers { + $$ = $2; + if (!strcmp($1, "precise")) $$ = add_modifiers(ctx, $2, HLSL_MODIFIER_PRECISE, &@1); else if (!strcmp($1, "single"))