Commit e0195ca4 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

comctl32: Fix an off by one error in ImageList_Remove.

parent 481de9d8
......@@ -2126,13 +2126,13 @@ ImageList_Remove (HIMAGELIST himl, INT i)
TRACE("Post image copy!\n");
SelectObject (hdcBmp, hbmNewImage);
imagelist_copy_images( himl, himl->hdcImage, hdcBmp, i,
(himl->cCurImage - i - 1), i - 1 );
imagelist_copy_images( himl, himl->hdcImage, hdcBmp, i + 1,
(himl->cCurImage - i), i );
if (himl->hbmMask) {
SelectObject (hdcBmp, hbmNewMask);
imagelist_copy_images( himl, himl->hdcMask, hdcBmp, i,
(himl->cCurImage - i - 1), i - 1 );
imagelist_copy_images( himl, himl->hdcMask, hdcBmp, i + 1,
(himl->cCurImage - i), i );
}
}
......
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