Numeric resource type ids are either specified as the number with MAKEINTRESOURCEW(), or as a string prefixed by '#'. But mshtml's res:// protocol also allows the resource type id to be a numeric string without the '#' prefix.
Signed-off-by: Damjan Jovanovic damjan.jov@gmail.com --- dlls/mshtml/protocol.c | 27 +++++++++++++++++++-------- dlls/mshtml/tests/protocol.c | 7 +++++++ 2 files changed, 26 insertions(+), 8 deletions(-)
Damjan Jovanovic damjan.jov@gmail.com wrote:
@@ -585,7 +586,11 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
*res_type++ = 0; if ((url_file = wcschr(res_type, '/'))) {
LPWSTR endpoint = NULL; *url_file++ = 0;
res_type_id = wcstol(res_type, &endpoint, 10);
if(endpoint != res_type+lstrlenW(res_type))
res_type_id = MAXDWORD;
Wouldn't it be simpler to check for *endpoint != 0? (Here and in other places).