[D3D 69] Fix dumb games (2/2)
Lionel Ulmer
lionel.ulmer at free.fr
Mon Dec 30 15:09:31 CST 2002
Changelog:
Fix for stupid applications reading some bytes after the end of the
surface memory.
--
Lionel Ulmer - http://www.bbrox.org/
-------------- next part --------------
--- /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)
More information about the wine-patches
mailing list