Jacek Caban : mshtml: Allow '#' to be the first char of resource name in res protocol.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Dec 24 13:40:37 CST 2014
Module: wine
Branch: master
Commit: fecbc88daf04c9e9e298d64d7c6919e31bb513ca
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fecbc88daf04c9e9e298d64d7c6919e31bb513ca
Author: Jacek Caban <jacek at codeweavers.com>
Date: Wed Dec 24 16:31:50 2014 +0100
mshtml: Allow '#' to be the first char of resource name in res protocol.
---
dlls/mshtml/protocol.c | 2 +-
dlls/mshtml/tests/protocol.c | 3 +++
dlls/mshtml/tests/rsrc.rc | 3 +++
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/mshtml/protocol.c b/dlls/mshtml/protocol.c
index 2499db4..9988c90 100644
--- a/dlls/mshtml/protocol.c
+++ b/dlls/mshtml/protocol.c
@@ -649,7 +649,7 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
/* Ignore query and hash parts. */
if((ptr = strchrW(url_file, '?')))
*ptr = 0;
- if((ptr = strchrW(url_file, '#')))
+ if(*url_file && (ptr = strchrW(url_file+1, '#')))
*ptr = 0;
hdll = LoadLibraryExW(url_dll, NULL, LOAD_LIBRARY_AS_DATAFILE);
diff --git a/dlls/mshtml/tests/protocol.c b/dlls/mshtml/tests/protocol.c
index 00971be..f9803df 100644
--- a/dlls/mshtml/tests/protocol.c
+++ b/dlls/mshtml/tests/protocol.c
@@ -606,6 +606,9 @@ static void test_res_protocol(void)
if(GetProcAddress(LoadLibraryA("urlmon.dll"), "CreateUri")) {
test_res_url("/test/dir/dir2/res.html?query_part");
test_res_url("/test/dir/dir2/res.html#hash_part");
+ test_res_url("/#123");
+ test_res_url("/#23/#123");
+ test_res_url("/#123#456");
}else {
win_skip("IUri not supported\n");
}
diff --git a/dlls/mshtml/tests/rsrc.rc b/dlls/mshtml/tests/rsrc.rc
index d498b82..33ffef5 100644
--- a/dlls/mshtml/tests/rsrc.rc
+++ b/dlls/mshtml/tests/rsrc.rc
@@ -40,6 +40,9 @@ blank.html HTML "blank.html"
/* @makedep: blank.html */
blank2.html HTML "blank.html"
+/* @makedep: blank.html */
+123 HTML "blank.html"
+
/* @makedep: test_tlb.tlb */
1 TYPELIB test_tlb.tlb
More information about the wine-cvs
mailing list