Commit 95ab7e8a authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

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

Spotted by Alex Henrie. Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 386e6799
......@@ -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)");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment