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: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2020-03-03 19:06:14 +03:30 committed by Alexandre Julliard
parent e531d89a39
commit 7622d97f78

View file

@ -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);