Commit 01219c65 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

wininet: The host name is optional in InternetCreateUrlW.

parent ed90c868
...@@ -3743,6 +3743,7 @@ static BOOL calc_url_length(LPURL_COMPONENTSW lpUrlComponents, ...@@ -3743,6 +3743,7 @@ static BOOL calc_url_length(LPURL_COMPONENTSW lpUrlComponents,
*lpdwUrlLength += URL_GET_COMP_LENGTH(lpUrlComponents, Password); *lpdwUrlLength += URL_GET_COMP_LENGTH(lpUrlComponents, Password);
} }
if (lpUrlComponents->lpszHostName)
*lpdwUrlLength += URL_GET_COMP_LENGTH(lpUrlComponents, HostName); *lpdwUrlLength += URL_GET_COMP_LENGTH(lpUrlComponents, HostName);
if (!url_uses_default_port(lpUrlComponents)) if (!url_uses_default_port(lpUrlComponents))
...@@ -3945,9 +3946,12 @@ BOOL WINAPI InternetCreateUrlW(LPURL_COMPONENTSW lpUrlComponents, DWORD dwFlags, ...@@ -3945,9 +3946,12 @@ BOOL WINAPI InternetCreateUrlW(LPURL_COMPONENTSW lpUrlComponents, DWORD dwFlags,
lpszUrl++; lpszUrl++;
} }
if (lpUrlComponents->lpszHostName)
{
dwLen = URL_GET_COMP_LENGTH(lpUrlComponents, HostName); dwLen = URL_GET_COMP_LENGTH(lpUrlComponents, HostName);
memcpy(lpszUrl, lpUrlComponents->lpszHostName, dwLen * sizeof(WCHAR)); memcpy(lpszUrl, lpUrlComponents->lpszHostName, dwLen * sizeof(WCHAR));
lpszUrl += dwLen; lpszUrl += dwLen;
}
if (!url_uses_default_port(lpUrlComponents)) if (!url_uses_default_port(lpUrlComponents))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment