Dmitry Timoshkov : comctl32: Fix an off by one error in ImageList_Remove.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Apr 23 08:39:14 CDT 2007


Module: wine
Branch: master
Commit: e0195ca4ef6a04bb324b6684de092e68bf9604f1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e0195ca4ef6a04bb324b6684de092e68bf9604f1

Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date:   Mon Apr 23 20:39:00 2007 +0900

comctl32: Fix an off by one error in ImageList_Remove.

---

 dlls/comctl32/imagelist.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c
index 0e314dd..df1f920 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 );
             }
         }
 




More information about the wine-cvs mailing list