Nikolay Sivov : comctl32/listview: Fix infinite loop case for full item range as a first search range.

Alexandre Julliard julliard at winehq.org
Tue Oct 5 14:41:47 CDT 2010


Module: wine
Branch: stable
Commit: 776938852700d5eea72831c08990a3162f1f440d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=776938852700d5eea72831c08990a3162f1f440d

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Fri Aug 20 11:03:25 2010 +0400

comctl32/listview: Fix infinite loop case for full item range as a first search range.
(cherry picked from commit ce5a06c1b0428347048f9b37f96a3fda0dceef47)

---

 dlls/comctl32/listview.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 4e13577..2ff37ba 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -1855,8 +1855,9 @@ static INT LISTVIEW_ProcessLetterKeys(LISTVIEW_INFO *infoPtr, WPARAM charCode, L
                 }
             }
 
-            /* found something or second search completed with any result */
-            if (nItem != -1 || endidx != infoPtr->nItemCount)
+            if ( nItem != -1 || /* found something */
+                 endidx != infoPtr->nItemCount || /* second search done */
+                (startidx == 0 && endidx == infoPtr->nItemCount) /* full range for first search */ )
                 break;
         };
     }




More information about the wine-cvs mailing list