Module: wine Branch: master Commit: f9da9675f001ab5731212e8bd2b9d17c19adb16c URL: https://source.winehq.org/git/wine.git/?a=commit;h=f9da9675f001ab5731212e8bd...
Author: Damjan Jovanovic damjan.jov@gmail.com Date: Fri Apr 24 18:37:27 2020 +0200
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
---
dlls/mshtml/protocol.c | 5 +++++ dlls/mshtml/tests/protocol.c | 7 +++++++ 2 files changed, 12 insertions(+)
diff --git a/dlls/mshtml/protocol.c b/dlls/mshtml/protocol.c index 0f06896c49..8677030c35 100644 --- a/dlls/mshtml/protocol.c +++ b/dlls/mshtml/protocol.c @@ -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; diff --git a/dlls/mshtml/tests/protocol.c b/dlls/mshtml/tests/protocol.c index ba767d21c6..75063f5ecf 100644 --- a/dlls/mshtml/tests/protocol.c +++ b/dlls/mshtml/tests/protocol.c @@ -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");