From b5c5783293d0f20008b0c0ee91aa815d37d9b13b Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Thu, 29 Aug 2024 03:24:21 +0200 Subject: [PATCH] vkd3d-shader: Explicitly set indices for the numeric type names array. Signed-off-by: Nikolay Sivov --- libs/vkd3d-shader/hlsl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c index 6323260e..32dd9686 100644 --- a/libs/vkd3d-shader/hlsl.c +++ b/libs/vkd3d-shader/hlsl.c @@ -3990,12 +3990,12 @@ static void declare_predefined_types(struct hlsl_ctx *ctx) static const char * const names[] = { - "float", - "half", - "double", - "int", - "uint", - "bool", + [HLSL_TYPE_FLOAT] = "float", + [HLSL_TYPE_HALF] = "half", + [HLSL_TYPE_DOUBLE] = "double", + [HLSL_TYPE_INT] = "int", + [HLSL_TYPE_UINT] = "uint", + [HLSL_TYPE_BOOL] = "bool", }; static const char *const variants_float[] = {"min10float", "min16float"};