shlwapi: Properly handle ParseURL errors in UrlGetPart[AW].

This commit is contained in:
Jacek Caban 2009-10-18 21:48:57 +02:00 committed by Alexandre Julliard
parent 87118d00fe
commit a34ed0f6ee
1 changed files with 6 additions and 4 deletions

View File

@ -2141,6 +2141,7 @@ HRESULT WINAPI UrlGetPartW(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut,
BOOL WINAPI PathIsURLA(LPCSTR lpstrPath)
{
PARSEDURLA base;
HRESULT hres;
TRACE("%s\n", debugstr_a(lpstrPath));
@ -2148,8 +2149,8 @@ BOOL WINAPI PathIsURLA(LPCSTR lpstrPath)
/* get protocol */
base.cbSize = sizeof(base);
ParseURLA(lpstrPath, &base);
return (base.nScheme != URL_SCHEME_INVALID);
hres = ParseURLA(lpstrPath, &base);
return hres == S_OK && (base.nScheme != URL_SCHEME_INVALID);
}
/*************************************************************************
@ -2160,6 +2161,7 @@ BOOL WINAPI PathIsURLA(LPCSTR lpstrPath)
BOOL WINAPI PathIsURLW(LPCWSTR lpstrPath)
{
PARSEDURLW base;
HRESULT hres;
TRACE("%s\n", debugstr_w(lpstrPath));
@ -2167,8 +2169,8 @@ BOOL WINAPI PathIsURLW(LPCWSTR lpstrPath)
/* get protocol */
base.cbSize = sizeof(base);
ParseURLW(lpstrPath, &base);
return (base.nScheme != URL_SCHEME_INVALID);
hres = ParseURLW(lpstrPath, &base);
return hres == S_OK && (base.nScheme != URL_SCHEME_INVALID);
}
/*************************************************************************