Commit 442b235e authored by Lionel Ulmer's avatar Lionel Ulmer Committed by Alexandre Julliard

Fix for stupid applications reading some bytes after the end of the

surface memory.
parent 00a3d5f3
......@@ -249,7 +249,8 @@ HRESULT DIB_DirectDrawSurface_Construct(IDirectDrawSurfaceImpl *This,
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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment