[PATCH vkd3d] vkd3d-compiler: Use the correct array count in validate_target_type().

Zebediah Figura zfigura at codeweavers.com
Mon Oct 5 19:45:23 CDT 2020


Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
 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 b38960ac..50e8ee3f 100644
--- a/programs/vkd3d-compiler/main.c
+++ b/programs/vkd3d-compiler/main.c
@@ -367,7 +367,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;
-- 
2.28.0




More information about the wine-devel mailing list