Module: wine
Branch: stable
Commit: 357fcf732d64283661f7ee3643fb7a698bf19f87
URL: http://source.winehq.org/git/wine.git/?a=commit;h=357fcf732d64283661f7ee364…
Author: Erich E. Hoover <erich.e.hoover(a)gmail.com>
Date: Wed Nov 6 11:59:16 2013 -0700
hhctrl.ocx: Do not destroy the HTML Help window when HH_HELP_CONTEXT finds no context id of 0.
(cherry picked from commit 87b1115db1aeb39d09fa5cdf349b1c0d6fea7d9f)
---
dlls/hhctrl.ocx/hhctrl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/hhctrl.ocx/hhctrl.c b/dlls/hhctrl.ocx/hhctrl.c
index 3392715..8b42569 100644
--- a/dlls/hhctrl.ocx/hhctrl.c
+++ b/dlls/hhctrl.ocx/hhctrl.c
@@ -273,6 +273,8 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat
url = FindContextAlias(info->pCHMInfo, data);
if(!url)
{
+ if(!data) /* there may legitimately be no context alias for id 0 */
+ return info->WinType.hwndHelp;
ReleaseHelpViewer(info);
return NULL;
}
Module: wine
Branch: stable
Commit: 0fabd379fe805f77615599c719d9aa17b5aee9a7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0fabd379fe805f77615599c71…
Author: Sebastian Lackner <sebastian(a)fds-team.de>
Date: Wed Nov 6 23:01:42 2013 +0100
shlwapi: Fix UrlCombineW for URLs containing a quotation mark.
(cherry picked from commit 7ee2c24a8cb0ea3ca50d62634fc5772438c2ae39)
---
dlls/shlwapi/url.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/dlls/shlwapi/url.c b/dlls/shlwapi/url.c
index 102faf5..11589e4 100644
--- a/dlls/shlwapi/url.c
+++ b/dlls/shlwapi/url.c
@@ -665,6 +665,7 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
DWORD i, len, res1, res2, process_case = 0;
LPWSTR work, preliminary, mbase, mrelative;
static const WCHAR myfilestr[] = {'f','i','l','e',':','/','/','/','\0'};
+ static const WCHAR fragquerystr[] = {'#','?',0};
HRESULT ret;
TRACE("(base %s, Relative %s, Combine size %d, flags %08x)\n",
@@ -736,17 +737,19 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
}
}
- /* If there is a '#' and the characters immediately preceding it are
- * ".htm[l]", then begin looking for the last leaf starting from
- * the '#'. Otherwise the '#' is not meaningful and just start
- * looking from the end. */
- if ((work = strchrW(base.pszSuffix + sizeloc, '#'))) {
+ /* If there is a '?', then the remaining part can only contain a
+ * query string or fragment, so start looking for the last leaf
+ * from the '?'. Otherwise, if there is a '#' and the characters
+ * immediately preceding it are ".htm[l]", then begin looking for
+ * the last leaf starting from the '#'. Otherwise the '#' is not
+ * meaningful and just start looking from the end. */
+ if ((work = strpbrkW(base.pszSuffix + sizeloc, fragquerystr))) {
const WCHAR htmlW[] = {'.','h','t','m','l',0};
const int len_htmlW = 5;
const WCHAR htmW[] = {'.','h','t','m',0};
const int len_htmW = 4;
- if (base.nScheme == URL_SCHEME_HTTP || base.nScheme == URL_SCHEME_HTTPS)
+ if (*work == '?' || base.nScheme == URL_SCHEME_HTTP || base.nScheme == URL_SCHEME_HTTPS)
manual_search = TRUE;
else if (work - base.pszSuffix > len_htmW) {
work -= len_htmW;