mshtml: Fix handling res protocol resource type ids without leading '#'.

Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
feature/deterministic
Damjan Jovanovic 2020-04-24 18:37:27 +02:00 committed by Alexandre Julliard
parent 7948b25192
commit f9da9675f0
2 changed files with 12 additions and 0 deletions

View File

@ -585,7 +585,12 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
*res_type++ = 0;
if ((url_file = wcschr(res_type, '/'))) {
DWORD res_type_id;
WCHAR *endpoint;
*url_file++ = 0;
res_type_id = wcstol(res_type, &endpoint, 10);
if(!*endpoint)
res_type = MAKEINTRESOURCEW(res_type_id);
}else {
url_file = res_type;
res_type = (LPWSTR)RT_HTML;

View File

@ -596,6 +596,13 @@ static void test_res_protocol(void)
IUnknown_Release(unk);
test_res_url("/blank.html");
test_res_url("/123");
test_res_url("/#23/blank.html");
test_res_url("/#23/123");
test_res_url("/23/blank.html");
test_res_url("/23/123");
test_res_url("/jstest.html");
test_res_url("/Test/res.html");
test_res_url("/test/dir/dir2/res.html");