Robert Shearman : wininet: The host name is optional in
InternetCreateUrlW.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Mar 9 16:06:07 CST 2006
Module: wine
Branch: refs/heads/master
Commit: 01219c65aa1d23bf56da3126039ffe5ee41e97e7
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=01219c65aa1d23bf56da3126039ffe5ee41e97e7
Author: Robert Shearman <rob at codeweavers.com>
Date: Thu Mar 9 15:15:00 2006 +0000
wininet: The host name is optional in InternetCreateUrlW.
---
dlls/wininet/internet.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c
index 55f6acc..7b87009 100644
--- a/dlls/wininet/internet.c
+++ b/dlls/wininet/internet.c
@@ -3743,7 +3743,8 @@ static BOOL calc_url_length(LPURL_COMPON
*lpdwUrlLength += URL_GET_COMP_LENGTH(lpUrlComponents, Password);
}
- *lpdwUrlLength += URL_GET_COMP_LENGTH(lpUrlComponents, HostName);
+ if (lpUrlComponents->lpszHostName)
+ *lpdwUrlLength += URL_GET_COMP_LENGTH(lpUrlComponents, HostName);
if (!url_uses_default_port(lpUrlComponents))
{
@@ -3945,9 +3946,12 @@ BOOL WINAPI InternetCreateUrlW(LPURL_COM
lpszUrl++;
}
- dwLen = URL_GET_COMP_LENGTH(lpUrlComponents, HostName);
- memcpy(lpszUrl, lpUrlComponents->lpszHostName, dwLen * sizeof(WCHAR));
- lpszUrl += dwLen;
+ if (lpUrlComponents->lpszHostName)
+ {
+ dwLen = URL_GET_COMP_LENGTH(lpUrlComponents, HostName);
+ memcpy(lpszUrl, lpUrlComponents->lpszHostName, dwLen * sizeof(WCHAR));
+ lpszUrl += dwLen;
+ }
if (!url_uses_default_port(lpUrlComponents))
{
More information about the wine-cvs
mailing list