From 8b98e483ac6ff520ed2e4a5a955b7d4679a3dab7 Mon Sep 17 00:00:00 2001 From: Elizabeth Figura Date: Thu, 29 Aug 2024 12:48:23 -0500 Subject: [PATCH] vkd3d-shader/hlsl: Handle error expressions in return statements. --- libs/vkd3d-shader/hlsl.y | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 9870eaeb..fa136402 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -941,6 +941,9 @@ static bool add_return(struct hlsl_ctx *ctx, struct hlsl_block *block, { struct hlsl_ir_node *store; + if (return_value->data_type->class == HLSL_CLASS_ERROR) + return true; + if (!(return_value = add_implicit_conversion(ctx, block, return_value, return_type, loc))) return false;