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
ec83f0c5
Commit
ec83f0c5
authored
Sep 05, 2019
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Sep 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hhctrl.ocx: Simplify extracting the help filename (Coverity).
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
faf354cd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
hhctrl.c
dlls/hhctrl.ocx/hhctrl.c
+3
-11
No files found.
dlls/hhctrl.ocx/hhctrl.c
View file @
ec83f0c5
...
...
@@ -99,15 +99,12 @@ static const char *command_to_string(UINT command)
static
BOOL
resolve_filename
(
const
WCHAR
*
env_filename
,
WCHAR
*
fullname
,
DWORD
buflen
,
WCHAR
**
index
,
WCHAR
**
window
)
{
const
WCHAR
*
extra
;
WCHAR
chm_file
[
MAX_PATH
];
static
const
WCHAR
helpW
[]
=
{
'\\'
,
'h'
,
'e'
,
'l'
,
'p'
,
'\\'
,
0
};
static
const
WCHAR
delimW
[]
=
{
':'
,
':'
,
0
};
static
const
WCHAR
delim2W
[]
=
{
'>'
,
0
};
DWORD
env_len
;
WCHAR
*
filename
;
WCHAR
*
filename
,
*
extra
;
env_filename
=
skip_schema
(
env_filename
);
...
...
@@ -128,9 +125,7 @@ static BOOL resolve_filename(const WCHAR *env_filename, WCHAR *fullname, DWORD b
extra
=
wcsstr
(
filename
,
delim2W
);
if
(
extra
)
{
memcpy
(
chm_file
,
filename
,
(
extra
-
filename
)
*
sizeof
(
WCHAR
));
chm_file
[
extra
-
filename
]
=
0
;
filename
=
chm_file
;
*
extra
=
0
;
if
(
window
)
*
window
=
strdupW
(
extra
+
1
);
}
...
...
@@ -138,10 +133,7 @@ static BOOL resolve_filename(const WCHAR *env_filename, WCHAR *fullname, DWORD b
extra
=
wcsstr
(
filename
,
delimW
);
if
(
extra
)
{
if
(
filename
!=
chm_file
)
memcpy
(
chm_file
,
filename
,
(
extra
-
filename
)
*
sizeof
(
WCHAR
));
chm_file
[
extra
-
filename
]
=
0
;
filename
=
chm_file
;
*
extra
=
0
;
if
(
index
)
*
index
=
strdupW
(
extra
+
2
);
}
...
...
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