Commit d1e5b3bf authored by Gerald Pfeifer's avatar Gerald Pfeifer Committed by Alexandre Julliard

ddraw: Fix two bounds checks.

parent 3176d936
......@@ -2956,7 +2956,7 @@ IDirect3DDeviceImpl_3_SetLightState(IDirect3DDevice3 *iface,
TRACE("(%p)->(%08x,%08x)\n", This, LightStateType, Value);
if (!LightStateType && (LightStateType > D3DLIGHTSTATE_COLORVERTEX))
if (!LightStateType || (LightStateType > D3DLIGHTSTATE_COLORVERTEX))
{
TRACE("Unexpected Light State Type\n");
return DDERR_INVALIDPARAMS;
......@@ -3089,7 +3089,7 @@ IDirect3DDeviceImpl_3_GetLightState(IDirect3DDevice3 *iface,
TRACE("(%p)->(%08x,%p)\n", This, LightStateType, Value);
if (!LightStateType && (LightStateType > D3DLIGHTSTATE_COLORVERTEX))
if (!LightStateType || (LightStateType > D3DLIGHTSTATE_COLORVERTEX))
{
TRACE("Unexpected Light State Type\n");
return DDERR_INVALIDPARAMS;
......
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