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
9e1d9ef9
Commit
9e1d9ef9
authored
Sep 08, 2010
by
Wolfram Sang
Committed by
Alexandre Julliard
Sep 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hhctrl: Add check for no filename.
parent
92c7e1ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
hhctrl.c
dlls/hhctrl.ocx/hhctrl.c
+8
-0
No files found.
dlls/hhctrl.ocx/hhctrl.c
View file @
9e1d9ef9
...
@@ -295,6 +295,9 @@ int WINAPI doWinMain(HINSTANCE hInstance, LPSTR szCmdLine)
...
@@ -295,6 +295,9 @@ int WINAPI doWinMain(HINSTANCE hInstance, LPSTR szCmdLine)
ptr
+=
strlen
(
"mapid"
)
+
1
;
ptr
+=
strlen
(
"mapid"
)
+
1
;
space
=
strchr
(
ptr
,
' '
);
space
=
strchr
(
ptr
,
' '
);
/* command line ends without number */
if
(
!
space
)
return
0
;
memcpy
(
idtxt
,
ptr
,
space
-
ptr
);
memcpy
(
idtxt
,
ptr
,
space
-
ptr
);
idtxt
[
space
-
ptr
]
=
'\0'
;
idtxt
[
space
-
ptr
]
=
'\0'
;
mapid
=
atoi
(
idtxt
);
mapid
=
atoi
(
idtxt
);
...
@@ -315,6 +318,11 @@ int WINAPI doWinMain(HINSTANCE hInstance, LPSTR szCmdLine)
...
@@ -315,6 +318,11 @@ int WINAPI doWinMain(HINSTANCE hInstance, LPSTR szCmdLine)
len
=
endq
-
szCmdLine
;
len
=
endq
-
szCmdLine
;
else
else
len
=
strlen
(
szCmdLine
);
len
=
strlen
(
szCmdLine
);
/* no filename given */
if
(
!
len
)
return
0
;
buflen
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szCmdLine
,
len
,
NULL
,
0
)
+
1
;
buflen
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szCmdLine
,
len
,
NULL
,
0
)
+
1
;
filename
=
heap_alloc
(
buflen
*
sizeof
(
WCHAR
));
filename
=
heap_alloc
(
buflen
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
szCmdLine
,
len
,
filename
,
buflen
);
MultiByteToWideChar
(
CP_ACP
,
0
,
szCmdLine
,
len
,
filename
,
buflen
);
...
...
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