Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
5ecd6e48
Commit
5ecd6e48
authored
Feb 10, 2020
by
Kevin Puetz
Committed by
Alexandre Julliard
Feb 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Fix handling resource IDs in paths when registering typelib helpdir.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2822b577
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
typelib.c
dlls/oleaut32/typelib.c
+13
-4
No files found.
dlls/oleaut32/typelib.c
View file @
5ecd6e48
...
...
@@ -722,17 +722,26 @@ HRESULT WINAPI RegisterTypeLib(ITypeLib *ptlib, const WCHAR *szFullPath, const W
KEY_WRITE
,
NULL
,
&
subKey
,
&
disposition
)
==
ERROR_SUCCESS
)
{
BSTR
freeHelpDir
=
NULL
;
OLECHAR
*
pIndexStr
;
WCHAR
*
file_name
;
/* if we created a new key, and helpDir was null, set the helpdir
to the directory which contains the typelib. However,
if we just opened an existing key, we leave the helpdir alone */
if
((
disposition
==
REG_CREATED_NEW_KEY
)
&&
(
szHelpDir
==
NULL
))
{
szHelpDir
=
freeHelpDir
=
SysAllocString
(
szFullPath
);
pIndexStr
=
wcsrchr
(
szHelpDir
,
'\\'
);
if
(
pIndexStr
)
{
*
pIndexStr
=
0
;
file_name
=
wcsrchr
(
szHelpDir
,
'\\'
);
if
(
file_name
&&
file_name
[
0
])
{
/* possible remove a numeric \index (resource-id) */
WCHAR
*
end_ptr
=
file_name
+
1
;
while
(
'0'
<=
*
end_ptr
&&
*
end_ptr
<=
'9'
)
end_ptr
++
;
if
(
!*
end_ptr
)
{
*
file_name
=
0
;
file_name
=
wcsrchr
(
szHelpDir
,
'\\'
);
}
}
if
(
file_name
)
*
file_name
=
0
;
}
/* if we have an szHelpDir, set it! */
...
...
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