From 4eadd917c7cdbbcdf802a3475cdbc05aab7eaf77 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Mon, 5 Oct 2020 19:45:23 -0500 Subject: [PATCH] vkd3d-compiler: Use the correct array count in validate_target_type(). Signed-off-by: Zebediah Figura Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- programs/vkd3d-compiler/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/vkd3d-compiler/main.c b/programs/vkd3d-compiler/main.c index da09ce36..7a1a5b0b 100644 --- a/programs/vkd3d-compiler/main.c +++ b/programs/vkd3d-compiler/main.c @@ -365,7 +365,7 @@ static bool validate_target_type( const enum vkd3d_shader_target_type *supported_types = vkd3d_shader_get_supported_target_types(source_type, &count); - for (i = 0; i < ARRAY_SIZE(target_type_info); ++i) + for (i = 0; i < count; ++i) { if (target_type == supported_types[i]) return true;