hhctrl.ocx: Look up in chm if url doesn't contain "://".

This commit is contained in:
Hin-Tak Leung 2008-04-14 20:17:27 +00:00 committed by Alexandre Julliard
parent 76299b37ea
commit 8988ab8f8d
1 changed files with 9 additions and 3 deletions

View File

@ -89,9 +89,15 @@ BOOL NavigateToUrl(HHInfo *info, LPCWSTR surl)
BOOL ret;
HRESULT hres;
hres = navigate_url(info, surl);
if(SUCCEEDED(hres))
return TRUE;
static const WCHAR url_indicator[] = {':', '/', '/'};
TRACE("%s\n", debugstr_w(surl));
if (strstrW(surl, url_indicator)) {
hres = navigate_url(info, surl);
if(SUCCEEDED(hres))
return TRUE;
} /* look up in chm if it doesn't look like a full url */
SetChmPath(&chm_path, info->pCHMInfo->szFile, surl);
ret = NavigateToChm(info, chm_path.chm_file, chm_path.chm_index);