[PATCH] [WinHelp]: fix regression introduced by Dmitry's Win64 warning fixes

Eric Pouech eric.pouech at orange.fr
Thu Apr 17 14:35:59 CDT 2008




A+
---

 programs/winhelp/hlpfile.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


diff --git a/programs/winhelp/hlpfile.c b/programs/winhelp/hlpfile.c
index 8181469..a577dcc 100644
--- a/programs/winhelp/hlpfile.c
+++ b/programs/winhelp/hlpfile.c
@@ -158,11 +158,11 @@ HLPFILE_PAGE *HLPFILE_PageByOffset(HLPFILE* hlpfile, LONG offset)
 static int comp_PageByHash(void *p, const void *key,
                            int leaf, void** next)
 {
-    ULONG_PTR lKey = (LONG_PTR)key;
-    ULONG_PTR lTest = GET_UINT(p, 0);
+    LONG32 lKey = (LONG32)(LONG_PTR)key;
+    LONG32 lTest = GET_UINT(p, 0);
 
     *next = (char *)p+(leaf?8:6);
-    WINE_TRACE("Comparing '%lu' with '%lu'\n", lKey, lTest);
+    WINE_TRACE("Comparing '%d' with '%d'\n", lKey, lTest);
     if (lTest < lKey) return -1;
     if (lTest > lKey) return 1;
     return 0;
@@ -184,7 +184,7 @@ HLPFILE_PAGE *HLPFILE_PageByHash(HLPFILE* hlpfile, LONG lHash)
     if (hlpfile->version <= 16)
         return HLPFILE_PageByNumber(hlpfile, lHash);
 
-    ptr = HLPFILE_BPTreeSearch(hlpfile->Context, ULongToPtr(lHash), comp_PageByHash);
+    ptr = HLPFILE_BPTreeSearch(hlpfile->Context, LongToPtr(lHash), comp_PageByHash);
     if (!ptr)
     {
         WINE_ERR("Page of hash %x not found in file %s\n", lHash, hlpfile->lpszPath);





More information about the wine-patches mailing list