Commit ee462a78 authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent 4180054c
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment