Module: wine Branch: master Commit: ee462a7801ae64cb57e890b62ed848c77d124154 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ee462a7801ae64cb57e890b62e...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Nov 21 11:42:48 2011 +0100
comctl32: Take the total bitmap size into account when reading a bottom-up image list.
---
dlls/comctl32/imagelist.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c index c32cb0b..ca6579f 100644 --- a/dlls/comctl32/imagelist.c +++ b/dlls/comctl32/imagelist.c @@ -2216,8 +2216,8 @@ HIMAGELIST WINAPI ImageList_Read (LPSTREAM pstm)
if (image_info->bmiHeader.biHeight > 0) /* bottom-up */ { - ptr += (imagelist_height( ilHead.cCurImage ) - 1) * stride; - mask_ptr += (imagelist_height( ilHead.cCurImage ) - 1) * stride / 8; + ptr += image_info->bmiHeader.biHeight * image_info->bmiHeader.biWidth - stride; + mask_ptr += (image_info->bmiHeader.biHeight * image_info->bmiHeader.biWidth - stride) / 8; stride = -stride; image_info->bmiHeader.biHeight = himl->cy; }