Józef Kucia : d3dx9: Fix the expected_length computation for non-square DDS files.
Module: wine Branch: master Commit: d313e4f9d3288bc9ee958a258bd4fd730af8cc8a URL: http://source.winehq.org/git/wine.git/?a=commit;h=d313e4f9d3288bc9ee958a258b... Author: Józef Kucia <joseph.kucia(a)gmail.com> Date: Tue May 22 22:35:56 2012 +0200 d3dx9: Fix the expected_length computation for non-square DDS files. --- dlls/d3dx9_36/surface.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c index 28975b9..6b0786c 100644 --- a/dlls/d3dx9_36/surface.c +++ b/dlls/d3dx9_36/surface.c @@ -366,7 +366,7 @@ static HRESULT get_image_info_from_dds(const void *buffer, UINT length, D3DXIMAG calculate_dds_surface_size(info, width, height, &pitch, &size); expected_length += size; width = max(1, width / 2); - height = max(1, width / 2); + height = max(1, height / 2); } expected_length *= faces;
participants (1)
-
Alexandre Julliard