From d9fb9d2ed14a47dc5f77bde5538e3822c56139d4 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Thu, 6 Aug 2009 10:56:52 -0500 Subject: [PATCH] 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, '#'))) -- 1.5.4.3