Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/kernelbase/path.c | 12 +++++------- dlls/shlwapi/tests/url.c | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/dlls/kernelbase/path.c b/dlls/kernelbase/path.c index d14316f05ee..35cce74ab24 100644 --- a/dlls/kernelbase/path.c +++ b/dlls/kernelbase/path.c @@ -4243,15 +4243,13 @@ static LONG parse_url(const WCHAR *url, struct parsed_url *pl) work = parse_url_element( pl->port, L"/\?#" ); pl->port_len = work - pl->port; } - if (*work == '/') + + if ((pl->query = wcschr( work, '?' ))) { - /* see if query string */ - if ((pl->query = wcschr( work, '?' ))) - { - ++pl->query; - pl->query_len = lstrlenW(pl->query); - } + ++pl->query; + pl->query_len = lstrlenW(pl->query); } + SuccessExit: TRACE("parse successful: scheme=%p(%ld), user=%p(%ld), pass=%p(%ld), host=%p(%ld), port=%p(%ld), query=%p(%ld)\n", pl->scheme, pl->scheme_len, pl->username, pl->username_len, pl->password, pl->password_len, pl->hostname, diff --git a/dlls/shlwapi/tests/url.c b/dlls/shlwapi/tests/url.c index 1b26204a94f..3bfd8961c8f 100644 --- a/dlls/shlwapi/tests/url.c +++ b/dlls/shlwapi/tests/url.c @@ -669,7 +669,7 @@ static void test_UrlGetPart(void) {"ftp:\/localhost/index.html", URL_PART_HOSTNAME, 0, S_OK, "localhost", .todo_hr = TRUE},
{"http://host?a:b@c:d", URL_PART_HOSTNAME, 0, S_OK, "host"}, - {"http://host?a:b@c:d", URL_PART_QUERY, 0, S_OK, "a:b@c:d", .todo_hr = TRUE}, + {"http://host?a:b@c:d", URL_PART_QUERY, 0, S_OK, "a:b@c:d"}, {"http://host#a:b@c:d", URL_PART_HOSTNAME, 0, S_OK, "host"}, {"http://host#a:b@c:d", URL_PART_QUERY, 0, S_FALSE, ""},