ddraw: Fix two bounds checks.

This commit is contained in:
Gerald Pfeifer 2009-06-19 19:07:42 +02:00 committed by Alexandre Julliard
parent 3176d936f9
commit d1e5b3bf62
1 changed files with 2 additions and 2 deletions

View File

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