Gerald Pfeifer : ddraw: Fix two bounds checks.
Alexandre Julliard
julliard at winehq.org
Mon Jun 22 09:04:13 CDT 2009
Module: wine
Branch: master
Commit: d1e5b3bf62b0a0baa0d842e109ad1c136625280b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d1e5b3bf62b0a0baa0d842e109ad1c136625280b
Author: Gerald Pfeifer <gerald at pfeifer.com>
Date: Fri Jun 19 19:07:42 2009 +0200
ddraw: Fix two bounds checks.
---
dlls/ddraw/device.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index 261d6e3..439e99f 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -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;
More information about the wine-cvs
mailing list