wined3d: Correct off-by-one errors when comparing against ARRAY_SIZE.

Spotted by Alex Henrie.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-09-30 15:27:37 -05:00 committed by Alexandre Julliard
parent 386e679957
commit 95ab7e8a09
1 changed files with 2 additions and 2 deletions

View File

@ -2059,7 +2059,7 @@ static void shader_dump_resource_type(struct wined3d_string_buffer *buffer, enum
/* WINED3D_SHADER_RESOURCE_TEXTURE_CUBEARRAY */ "texturecubearray",
};
if (type <= ARRAY_SIZE(resource_type_names))
if (type < ARRAY_SIZE(resource_type_names))
shader_addline(buffer, "%s", resource_type_names[type]);
else
shader_addline(buffer, "unknown");
@ -2080,7 +2080,7 @@ static void shader_dump_data_type(struct wined3d_string_buffer *buffer, enum win
/* WINED3D_DATA_OPAQUE */ "(opaque)",
};
if (type <= ARRAY_SIZE(data_type_names))
if (type < ARRAY_SIZE(data_type_names))
shader_addline(buffer, "%s", data_type_names[type]);
else
shader_addline(buffer, "(unknown)");