Author: khornicek
Date: Fri Nov 21 03:58:07 2008
New Revision: 37503
URL:
http://svn.reactos.org/svn/reactos?rev=37503&view=rev
Log:
- fix some checks, verified in win xp
Modified:
branches/reactx/reactos/dll/directx/ddraw/Surface/createsurface.c
Modified: branches/reactx/reactos/dll/directx/ddraw/Surface/createsurface.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/ddra…
==============================================================================
--- branches/reactx/reactos/dll/directx/ddraw/Surface/createsurface.c [iso-8859-1]
(original)
+++ branches/reactx/reactos/dll/directx/ddraw/Surface/createsurface.c [iso-8859-1] Fri Nov
21 03:58:07 2008
@@ -49,7 +49,7 @@
return CLASS_E_NOAGGREGATION;
}
- if(!pDDSD->dwFlags & DDSD_CAPS)
+ if(!(pDDSD->dwFlags & DDSD_CAPS))
{
return DDERR_INVALIDPARAMS;
}
@@ -64,14 +64,14 @@
return DDERR_INVALIDCAPS;
}
- if(!(pDDSD->dwFlags & DDSD_HEIGHT) && !(pDDSD->dwFlags &
DDSD_HEIGHT)
- && !(pDDSD->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE))
+ if((!(pDDSD->dwFlags & DDSD_HEIGHT) || !(pDDSD->dwFlags & DDSD_WIDTH))
+ && !(pDDSD->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE))
{
return DDERR_INVALIDPARAMS;
}
- else if(pDDSD->dwFlags & DDSD_HEIGHT && pDDSD->dwFlags &
DDSD_HEIGHT
- && pDDSD->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
+ else if(((pDDSD->dwFlags & DDSD_HEIGHT) || (pDDSD->dwFlags &
DDSD_WIDTH))
+ && (pDDSD->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE))
{
return DDERR_INVALIDPARAMS;
}