From e0195ca4ef6a04bb324b6684de092e68bf9604f1 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Mon, 23 Apr 2007 20:39:00 +0900 Subject: [PATCH] comctl32: Fix an off by one error in ImageList_Remove. --- dlls/comctl32/imagelist.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c index 0e314ddf9b..df1f920c3d 100644 --- a/dlls/comctl32/imagelist.c +++ b/dlls/comctl32/imagelist.c @@ -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 ); } }