From 5649746b60af65248177309e1c998dff1aa9aef4 Mon Sep 17 00:00:00 2001 From: Matteo Bruni Date: Wed, 19 Jun 2013 21:59:24 +0200 Subject: [PATCH] wined3d: Fix NP2 surface repacking in surface_download_data. --- dlls/wined3d/surface.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index a325ac0a773..83ff41fb57f 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2246,12 +2246,11 @@ static void surface_download_data(struct wined3d_surface *surface, const struct src_data = mem; dst_data = surface->resource.allocatedMemory; TRACE("(%p) : Repacking the surface data from pitch %d to pitch %d\n", surface, src_pitch, dst_pitch); - for (y = 1; y < surface->resource.height; ++y) + for (y = 0; y < surface->resource.height; ++y) { - /* skip the first row */ + memcpy(dst_data, src_data, dst_pitch); src_data += src_pitch; dst_data += dst_pitch; - memcpy(dst_data, src_data, dst_pitch); } HeapFree(GetProcessHeap(), 0, mem);