[4/7] DDraw: remove a wrong size check

Stefan Dösinger stefandoesinger at gmx.at
Fri Oct 13 04:03:56 CDT 2006


Same patch as yesterday, but applies without line differences now.

desc2 is declared as DDSURFACEDESC2 in the local function, do the dwCaps2 
member exists always in this structure. The other size check before removing 
the flag from DDSD is fine.
-------------- next part --------------
From 5e68f03dbece5091d18a29fbaadcf21a94e0bff2 Mon Sep 17 00:00:00 2001
From: Stefan Doesinger <stefan at codeweavers.com>
Date: Fri, 13 Oct 2006 10:52:49 +0200
Subject: [PATCH] DDraw: Remove a wrong size check
---
 dlls/ddraw/ddraw.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index d5c7f87..1dc3bfb 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -2393,7 +2393,7 @@ IDirectDrawImpl_CreateSurface(IDirectDra
         desc2.ddsCaps.dwCaps |= DDSCAPS_BACKBUFFER;
     }
     /* Set the DDSCAPS2_MIPMAPSUBLEVEL flag on mipmap sublevels according to the msdn */
-    if((DDSD->ddsCaps.dwCaps & DDSCAPS_MIPMAP)&&(DDSD->dwSize >= sizeof(DDSURFACEDESC2)))
+    if(DDSD->ddsCaps.dwCaps & DDSCAPS_MIPMAP)
     {
         desc2.ddsCaps.dwCaps2 |= DDSCAPS2_MIPMAPSUBLEVEL;
     }
-- 
1.4.1.1



More information about the wine-patches mailing list