fixing another crash for -O3

svn path=/trunk/; revision=27045
This commit is contained in:
Magnus Olsen 2007-06-07 12:39:42 +00:00
parent 259286f6fc
commit 79583495ee

View file

@ -29,7 +29,11 @@ Main_DirectDraw_EnumDisplayModes(LPDIRECTDRAW7 iface, DWORD dwFlags,
{
DX_STUB_str("here\n");
if(!pCallback)
if
((!IsBadReadPtr(pCallback,sizeof(LPDDENUMMODESCALLBACK2))) ||
(!IsBadWritePtr(pCallback,sizeof(LPDDENUMMODESCALLBACK2))) ||
(!IsBadReadPtr(pDDSD,sizeof(DDSURFACEDESC2))) ||
(!IsBadWritePtr(pDDSD,sizeof(DDSURFACEDESC2))))
{
ret = DDERR_INVALIDPARAMS;
}
@ -67,6 +71,8 @@ Main_DirectDraw_EnumDisplayModes(LPDIRECTDRAW7 iface, DWORD dwFlags,
*/
SurfaceDesc.ddpfPixelFormat.dwRGBBitCount = DevMode.dmBitsPerPel;
DX_STUB_str("here\n");
// FIXME1: This->lpLcl->lpGbl->dwMonitorFrequency is not set !
if(dwFlags & DDEDM_REFRESHRATES && SurfaceDesc.dwRefreshRate != This->lpLcl->lpGbl->dwMonitorFrequency)
{