Commit cacad1df authored by Michael Müller's avatar Michael Müller Committed by Alexandre Julliard

wininet: Correctly set lpszUrlPath in InternetCrackUrlW for urls without path component.

parent 060d8c6a
...@@ -1917,9 +1917,7 @@ BOOL WINAPI InternetCrackUrlW(const WCHAR *lpszUrl, DWORD dwUrlLength, DWORD dwF ...@@ -1917,9 +1917,7 @@ BOOL WINAPI InternetCrackUrlW(const WCHAR *lpszUrl, DWORD dwUrlLength, DWORD dwF
} }
else else
{ {
if (lpUC->lpszUrlPath && (lpUC->dwUrlPathLength > 0)) set_url_component(&lpUC->lpszUrlPath, &lpUC->dwUrlPathLength, lpszcp, 0);
lpUC->lpszUrlPath[0] = 0;
lpUC->dwUrlPathLength = 0;
} }
TRACE("%s: scheme(%s) host(%s) path(%s) extra(%s)\n", debugstr_wn(lpszUrl,dwUrlLength), TRACE("%s: scheme(%s) host(%s) path(%s) extra(%s)\n", debugstr_wn(lpszUrl,dwUrlLength),
......
...@@ -130,6 +130,9 @@ static const crack_url_test_t crack_url_tests[] = { ...@@ -130,6 +130,9 @@ static const crack_url_test_t crack_url_tests[] = {
{"HtTp://www.winehq.org/scheme", {"HtTp://www.winehq.org/scheme",
0, 4, INTERNET_SCHEME_HTTP, 7, 14, 23, 80, -1, 0, -1, 0, 21, 7, -1, 0, 0, 4, INTERNET_SCHEME_HTTP, 7, 14, 23, 80, -1, 0, -1, 0, 21, 7, -1, 0,
"HtTp", "www.winehq.org", "", "", "/scheme", ""}, "HtTp", "www.winehq.org", "", "", "/scheme", ""},
{"http://www.winehq.org",
0, 4, INTERNET_SCHEME_HTTP, 7, 14, 23, 80, -1, 0, -1, 0, 21, 0, -1, 0,
"http", "www.winehq.org", "", "", "", ""},
{"file:///C:/Program%20Files/Atmel/AVR%20Tools/STK500/STK500.xml", {"file:///C:/Program%20Files/Atmel/AVR%20Tools/STK500/STK500.xml",
0, 4, INTERNET_SCHEME_FILE, -1, 0, -1, 0, -1, 0, -1, 0, 7, 55, -1, 0, 0, 4, INTERNET_SCHEME_FILE, -1, 0, -1, 0, -1, 0, -1, 0, 7, 55, -1, 0,
"file", "", "", "", "C:\\Program Files\\Atmel\\AVR Tools\\STK500\\STK500.xml", ""}, "file", "", "", "", "C:\\Program Files\\Atmel\\AVR Tools\\STK500\\STK500.xml", ""},
......
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