From 588784e4dcdb53e3a0f6c645f7d5c2e0faf8c091 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Fri, 11 Nov 2022 20:34:40 -0600 Subject: [PATCH] vkd3d-shader/hlsl: Use add_unary_arithmetic_expr() in the subtraction rule. --- libs/vkd3d-shader/hlsl.y | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 7efd6a12..59744796 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -6184,9 +6184,8 @@ add_expr: { struct hlsl_ir_node *neg; - if (!(neg = hlsl_new_unary_expr(ctx, HLSL_OP1_NEG, node_from_list($3), &@2))) + if (!(neg = add_unary_arithmetic_expr(ctx, $3, HLSL_OP1_NEG, node_from_list($3), &@2))) YYABORT; - list_add_tail($3, &neg->entry); $$ = add_binary_expr_merge(ctx, $1, $3, HLSL_OP2_ADD, &@2); }