comctl32: Take the total bitmap size into account when reading a bottom-up image list.

This commit is contained in:
Alexandre Julliard 2011-11-21 11:42:48 +01:00
parent 4180054c2f
commit ee462a7801
1 changed files with 2 additions and 2 deletions

View File

@ -2216,8 +2216,8 @@ HIMAGELIST WINAPI ImageList_Read (LPSTREAM pstm)
if (image_info->bmiHeader.biHeight > 0) /* bottom-up */ if (image_info->bmiHeader.biHeight > 0) /* bottom-up */
{ {
ptr += (imagelist_height( ilHead.cCurImage ) - 1) * stride; ptr += image_info->bmiHeader.biHeight * image_info->bmiHeader.biWidth - stride;
mask_ptr += (imagelist_height( ilHead.cCurImage ) - 1) * stride / 8; mask_ptr += (image_info->bmiHeader.biHeight * image_info->bmiHeader.biWidth - stride) / 8;
stride = -stride; stride = -stride;
image_info->bmiHeader.biHeight = himl->cy; image_info->bmiHeader.biHeight = himl->cy;
} }