[ddraw] DirectDrawSurface SetPrivateData not actually copying the data

Antoine Chavasse a.chavasse at gmail.com
Sat May 21 14:06:35 CDT 2005


SetPrivateData allocates the new data buffer, chain it into the list,
but doesn't copy the data buffer and doesn't set the data size.

This fixes some problems in Anarchy Online: textures are uploaded
properly, so it now actually displays stuff, and it doesn't crash
anymore when going in the game after character creation or with an
already created character.

ChangeLog:
 - Made SetPrivateData actually store the data from the buffer as well
as its size.

--
Index: dlls/ddraw/dsurface/main.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/dsurface/main.c,v
retrieving revision 1.64
diff -u -r1.64 main.c
--- dlls/ddraw/dsurface/main.c	7 Mar 2005 12:23:34 -0000	1.64
+++ dlls/ddraw/dsurface/main.c	21 May 2005 18:51:45 -0000
@@ -1394,6 +1394,9 @@
 		HeapFree(GetProcessHeap(), 0, data);
 		return DDERR_OUTOFMEMORY;
 	    }
+
+            data->size = cbSize;
+            memcpy(data->ptr.data, pData, data->size);
 	}
 
 	/* link it in */




More information about the wine-patches mailing list