shdocvw: Don't use separate call of UrlApplySchemeW for default scheme.

This commit is contained in:
Sergey Khodych 2011-05-15 00:18:10 +03:00 committed by Alexandre Julliard
parent c55ff281c7
commit 2034439d66
1 changed files with 1 additions and 7 deletions

View File

@ -333,14 +333,8 @@ DWORD WINAPI ParseURLFromOutsideSourceW(LPCWSTR url, LPWSTR out, LPDWORD plen, L
if (!PathIsURLW(ptr)) {
len = sizeof(buffer_in) / sizeof(buffer_in[0]);
buffer_in[0] = 0;
hr = UrlApplySchemeW(ptr, buffer_in, &len, URL_APPLY_GUESSSCHEME);
hr = UrlApplySchemeW(ptr, buffer_in, &len, URL_APPLY_GUESSSCHEME | URL_APPLY_DEFAULT);
TRACE("got 0x%x with %s\n", hr, debugstr_w(buffer_in));
if (hr != S_OK) {
/* when we can't guess the scheme, use the default scheme */
len = sizeof(buffer_in) / sizeof(buffer_in[0]);
hr = UrlApplySchemeW(ptr, buffer_in, &len, URL_APPLY_DEFAULT);
}
if (hr == S_OK) {
/* we parsed the url to buffer_in */
ptr = buffer_in;