[PATCH] wined3d: Fix struct size calculation

A C Hurst A.Hurst at sheffield.ac.uk
Wed Feb 28 18:04:46 CST 2007


Sent this once before I had subscribed, so if you see it twice, apologies.


>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