Commit 7622d97f authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d8: Avoid checking the stage index in d3d8_device_GetTextureStageState() (Coverity).

The correct limit for d3d8 would be WINED3D_MAX_TEXTURES, since that's the size of the "texture_states" array. However, the original code didn't check the stage index at all, so simply remove it. Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent e531d89a
......@@ -2250,13 +2250,6 @@ static HRESULT WINAPI d3d8_device_GetTextureStageState(IDirect3DDevice8 *iface,
TRACE("iface %p, stage %u, state %#x, value %p.\n", iface, stage, state, value);
if (stage >= WINED3D_MAX_FRAGMENT_SAMPLERS)
{
WARN("Invalid stage %u.\n", stage);
*value = 0;
return D3D_OK;
}
if (state >= ARRAY_SIZE(tss_lookup))
{
WARN("Invalid state %#x.\n", state);
......
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