Piotr Caban : wininet: Use the same hashing function as native does.

Alexandre Julliard julliard at winehq.org
Thu Apr 19 13:27:53 CDT 2012


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

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Thu Apr 19 13:26:33 2012 +0200

wininet: Use the same hashing function as native does.

---

 dlls/wininet/urlcache.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/wininet/urlcache.c b/dlls/wininet/urlcache.c
index 81b9fda..e958d00 100644
--- a/dlls/wininet/urlcache.c
+++ b/dlls/wininet/urlcache.c
@@ -77,7 +77,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wininet);
 #define HASHTABLE_LOCK          2
 #define HASHTABLE_FREE          3
 #define HASHTABLE_REDR          5
-#define HASHTABLE_FLAG_BITS     4
+#define HASHTABLE_FLAG_BITS     5
 
 #define DWORD_SIG(a,b,c,d)  (a | (b << 8) | (c << 16) | (d << 24))
 #define URL_SIGNATURE   DWORD_SIG('U','R','L',' ')
@@ -1228,7 +1228,7 @@ static DWORD URLCache_HashKey(LPCSTR lpszKey)
     DWORD i;
 
     for (i = 0; i < sizeof(key) / sizeof(key[0]); i++)
-        key[i] = lookupTable[i];
+        key[i] = lookupTable[(*lpszKey + i) & 0xFF];
 
     for (lpszKey++; *lpszKey && ((lpszKey[0] != '/') || (lpszKey[1] != 0)); lpszKey++)
     {




More information about the wine-cvs mailing list