[D3D 69] Fix dumb games (2/2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Changelog:
 Fix for stupid applications reading some bytes after the end of the
 surface memory.

-- 
		 Lionel Ulmer - http://www.bbrox.org/
--- /home/ulmer/Wine/wine_base//dlls/ddraw/dsurface/dib.c	2002-12-25 21:56:08.000000000 +0100
+++ /home/ulmer/Wine/wine_work//dlls/ddraw/dsurface/dib.c	2002-12-30 20:34:06.000000000 +0100
@@ -249,7 +249,8 @@
 
 	This->surface_desc.lpSurface
 	    = VirtualAlloc(NULL, This->surface_desc.u1.lPitch
-			   * This->surface_desc.dwHeight,
+			   * This->surface_desc.dwHeight + 4, /* The + 4 here is for dumb games reading after the end of the surface
+								 when reading the last byte / half using word access */
 			   MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
 
 	if (This->surface_desc.lpSurface == NULL)

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux