From b14f63847b2f5c8ef698e2ead77b4166039986a0 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Thu, 11 Apr 2002 21:47:53 +0000 Subject: [PATCH] SIC_GetIconIndex: start DPA_Search from index 0. --- dlls/shell32/iconcache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/iconcache.c b/dlls/shell32/iconcache.c index c12841978ec..2189798362b 100644 --- a/dlls/shell32/iconcache.c +++ b/dlls/shell32/iconcache.c @@ -63,7 +63,7 @@ static CRITICAL_SECTION SHELL32_SicCS = CRITICAL_SECTION_INIT("SHELL32_SicCS"); * Callback for DPA_Search */ static INT CALLBACK SIC_CompareEntries( LPVOID p1, LPVOID p2, LPARAM lparam) -{ TRACE("%p %p\n", p1, p2); +{ TRACE("%p %p %8lx\n", p1, p2, lparam); if (((LPSIC_ENTRY)p1)->dwSourceIndex != ((LPSIC_ENTRY)p2)->dwSourceIndex) /* first the faster one*/ return 1; @@ -161,7 +161,8 @@ INT SIC_GetIconIndex (LPCSTR sSourceFile, INT dwSourceIndex ) if (NULL != pDPA_GetPtr (sic_hdpa, 0)) { - index = pDPA_Search (sic_hdpa, &sice, -1L, SIC_CompareEntries, 0, 0); + /* search linear from position 0*/ + index = pDPA_Search (sic_hdpa, &sice, 0, SIC_CompareEntries, 0, 0); } if ( INVALID_INDEX == index )