wininet: Add missing schemes to url_schemes.

Fixes res URL scheme handling.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=31399
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2019-12-19 15:10:47 +01:00 committed by Alexandre Julliard
parent f64832fe6a
commit 64cb9425da
2 changed files with 17 additions and 11 deletions

View File

@ -1572,16 +1572,19 @@ BOOL WINAPI InternetCrackUrlA(const char *url, DWORD url_length, DWORD flags, UR
return ret;
}
static const WCHAR url_schemes[][7] =
static const WCHAR *url_schemes[] =
{
{'f','t','p',0},
{'g','o','p','h','e','r',0},
{'h','t','t','p',0},
{'h','t','t','p','s',0},
{'f','i','l','e',0},
{'n','e','w','s',0},
{'m','a','i','l','t','o',0},
{'r','e','s',0},
L"ftp",
L"gopher",
L"http",
L"https",
L"file",
L"news",
L"mailto",
L"socks",
L"javascript",
L"vbscript",
L"res"
};
/***********************************************************************
@ -4199,7 +4202,7 @@ static LPCWSTR INTERNET_GetSchemeString(INTERNET_SCHEME scheme)
index = scheme - INTERNET_SCHEME_FIRST;
if (index >= ARRAY_SIZE(url_schemes))
return NULL;
return (LPCWSTR)url_schemes[index];
return url_schemes[index];
}
/* we can calculate using ansi strings because we're just

View File

@ -168,7 +168,10 @@ static const crack_url_test_t crack_url_tests[] = {
"file", "", "", "", "C:\\Program Files\\Atmel\\.\\Asdf.xml", ""},
{"C:\\file.txt",
0, 1, INTERNET_SCHEME_UNKNOWN, -1, 0, -1, 0, -1, 0, -1, 0, 2, 9, -1, 0,
"C", "", "", "", "\\file.txt", ""}
"C", "", "", "", "\\file.txt", ""},
{"res://IELib.dll/test.htm",
0, 3, INTERNET_SCHEME_RES, 6, 9, -1, 0, -1, 0, -1, 0, 15, 9, -1, 0,
"res", "IELib.dll", "", "", "/test.htm", ""},
};
static WCHAR *a2w(const char *str)