Vincent Povirk : hhctrl.ocx: Ensure that the topic within MSITStore url' s begins with /.

Alexandre Julliard julliard at winehq.org
Fri Aug 7 08:49:42 CDT 2009


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

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Fri Aug  7 15:27:18 2009 +0200

hhctrl.ocx: Ensure that the topic within MSITStore url's begins with /.

---

 dlls/hhctrl.ocx/help.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/hhctrl.ocx/help.c b/dlls/hhctrl.ocx/help.c
index ff70338..a19e1e6 100644
--- a/dlls/hhctrl.ocx/help.c
+++ b/dlls/hhctrl.ocx/help.c
@@ -115,7 +115,9 @@ BOOL NavigateToChm(HHInfo *info, LPCWSTR file, LPCWSTR index)
     LPWSTR ptr;
 
     static const WCHAR url_format[] =
-        {'m','k',':','@','M','S','I','T','S','t','o','r','e',':','%','s',':',':','%','s',0};
+        {'m','k',':','@','M','S','I','T','S','t','o','r','e',':','%','s',':',':','%','s','%','s',0};
+    static const WCHAR slash[] = {'/',0};
+    static const WCHAR empty[] = {0};
 
     TRACE("%p %s %s\n", info, debugstr_w(file), debugstr_w(index));
 
@@ -127,7 +129,7 @@ BOOL NavigateToChm(HHInfo *info, LPCWSTR file, LPCWSTR index)
         return FALSE;
     }
 
-    wsprintfW(buf, url_format, full_path, index);
+    wsprintfW(buf, url_format, full_path, index[0] == '/' ? empty : slash, index);
 
     /* FIXME: HACK */
     if((ptr = strchrW(buf, '#')))




More information about the wine-cvs mailing list