Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
edf4e618
Commit
edf4e618
authored
Jul 19, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 22, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Better res protocol URL parsing.
parent
fa12cffa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
18 deletions
+14
-18
protocol.c
dlls/mshtml/protocol.c
+14
-18
No files found.
dlls/mshtml/protocol.c
View file @
edf4e618
...
...
@@ -631,31 +631,27 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
}
url_dll
=
url
+
sizeof
(
wszRes
)
/
sizeof
(
wszRes
[
0
]);
if
(
!
(
url_file
=
str
rchrW
(
url_dll
,
'/'
)))
{
if
(
!
(
res_type
=
st
rchrW
(
url_dll
,
'/'
)))
{
WARN
(
"wrong url: %s
\n
"
,
debugstr_w
(
url
));
IInternetProtocolSink_ReportResult
(
pOIProtSink
,
MK_E_SYNTAX
,
0
,
NULL
);
heap_free
(
url
);
return
MK_E_SYNTAX
;
}
*
url_file
++
=
0
;
*
res_type
++
=
0
;
if
((
url_file
=
strchrW
(
res_type
,
'/'
)))
{
*
url_file
++
=
0
;
}
else
{
url_file
=
res_type
;
res_type
=
MAKEINTRESOURCEW
(
RT_HTML
);
}
hdll
=
LoadLibraryExW
(
url_dll
,
NULL
,
LOAD_LIBRARY_AS_DATAFILE
);
if
(
!
hdll
)
{
if
(
!
(
res_type
=
strrchrW
(
url_dll
,
'/'
)))
{
WARN
(
"Could not open dll: %s
\n
"
,
debugstr_w
(
url_dll
));
IInternetProtocolSink_ReportResult
(
pOIProtSink
,
HRESULT_FROM_WIN32
(
GetLastError
()),
0
,
NULL
);
heap_free
(
url
);
return
HRESULT_FROM_WIN32
(
GetLastError
());
}
*
res_type
++
=
0
;
hdll
=
LoadLibraryExW
(
url_dll
,
NULL
,
LOAD_LIBRARY_AS_DATAFILE
);
if
(
!
hdll
)
{
WARN
(
"Could not open dll: %s
\n
"
,
debugstr_w
(
url_dll
));
IInternetProtocolSink_ReportResult
(
pOIProtSink
,
HRESULT_FROM_WIN32
(
GetLastError
()),
0
,
NULL
);
heap_free
(
url
);
return
HRESULT_FROM_WIN32
(
GetLastError
());
}
WARN
(
"Could not open dll: %s
\n
"
,
debugstr_w
(
url_dll
));
IInternetProtocolSink_ReportResult
(
pOIProtSink
,
HRESULT_FROM_WIN32
(
GetLastError
()),
0
,
NULL
);
heap_free
(
url
);
return
HRESULT_FROM_WIN32
(
GetLastError
());
}
TRACE
(
"trying to find resource type %s, name %s
\n
"
,
debugstr_w
(
res_type
),
debugstr_w
(
url_file
));
...
...
@@ -665,7 +661,7 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
LPWSTR
endpoint
=
NULL
;
DWORD
file_id
=
strtolW
(
url_file
,
&
endpoint
,
10
);
if
(
endpoint
==
url_file
+
strlenW
(
url_file
))
src
=
FindResourceW
(
hdll
,
MAKEINTRESOURCEW
(
file_id
),
MAKEINTRESOURCEW
(
RT_HTML
)
);
src
=
FindResourceW
(
hdll
,
MAKEINTRESOURCEW
(
file_id
),
res_type
);
if
(
!
src
)
{
WARN
(
"Could not find resource
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment