wined3d: Don't copy the extra line.

biSizeImage has an extra line added to it, and passing it to memcpy can cause a 
crash.
This commit is contained in:
Alexander Dorofeyev 2008-04-07 00:05:42 +03:00 committed by Alexandre Julliard
parent e7c00ca727
commit 2f9e8a901c
1 changed files with 1 additions and 1 deletions

View File

@ -545,7 +545,7 @@ HRESULT IWineD3DBaseSurfaceImpl_CreateDIBSection(IWineD3DSurface *iface) {
TRACE("DIBSection at : %p\n", This->dib.bitmap_data);
/* copy the existing surface to the dib section */
if(This->resource.allocatedMemory) {
memcpy(This->dib.bitmap_data, This->resource.allocatedMemory, b_info->bmiHeader.biSizeImage);
memcpy(This->dib.bitmap_data, This->resource.allocatedMemory, This->currentDesc.Height * IWineD3DSurface_GetPitch(iface));
} else {
/* This is to make LockRect read the gl Texture although memory is allocated */
This->Flags &= ~SFLAG_INSYSMEM;