Fix for stupid applications reading some bytes after the end of the
surface memory.
This commit is contained in:
parent
00a3d5f3f8
commit
442b235e63
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue