wined3d: Fix struct size calculation in EnumTextureFormats

A C Hurst A.Hurst at sheffield.ac.uk
Fri Mar 2 07:40:55 CST 2007


This fixes the calculation of a struct size field. And fixes bug 7061.
I sent this earlier, but the patch included a line break thanks to my webmail
interface.  Here it is again, unbreaked.
-------------- next part --------------
From f03d56e702d5dab7c68f46e2a97e21dd8a978356 Mon Sep 17 00:00:00 2001
From: ahurst <ahurst at hurstmachine.(none)>
Date: Wed, 28 Feb 2007 21:44:28 +0000
Subject: [PATCH] Fix struct size calculation

---
 dlls/ddraw/device.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index 0814921..231e2cd 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -1207,7 +1207,7 @@ IDirect3DDeviceImpl_2_EnumTextureFormats(IDirect3DDevice2 *iface,
             sdesc.dwSize = sizeof(sdesc);
             sdesc.dwFlags = DDSD_PIXELFORMAT | DDSD_CAPS;
             sdesc.ddsCaps.dwCaps = DDSCAPS_TEXTURE;
-            sdesc.ddpfPixelFormat.dwSize = sizeof(sdesc.ddpfPixelFormat.dwSize);
+            sdesc.ddpfPixelFormat.dwSize = sizeof(sdesc.ddpfPixelFormat);
             PixelFormat_WineD3DtoDD(&sdesc.ddpfPixelFormat, FormatList[i]);
 
             TRACE("Enumerating WineD3DFormat %d\n", FormatList[i]);
-- 
1.4.4.4



More information about the wine-patches mailing list