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
9714152e
Commit
9714152e
authored
Sep 02, 2000
by
Andreas Mohr
Committed by
Alexandre Julliard
Sep 02, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid crash on empty command-line.
parent
acc81bab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
process.c
scheduler/process.c
+7
-4
No files found.
scheduler/process.c
View file @
9714152e
...
@@ -269,15 +269,18 @@ static int load_system_dlls(void)
...
@@ -269,15 +269,18 @@ static int load_system_dlls(void)
/***********************************************************************
/***********************************************************************
* build_command_line
* build_command_line
*
*
* Build the command-line of a process from the argv array.
* Build the command line of a process from the argv array.
*
* Note that it does NOT necessarily include the file name.
* Sometimes we don't even have any command line options at all.
*/
*/
static
inline
char
*
build_command_line
(
char
**
argv
)
static
inline
char
*
build_command_line
(
char
**
argv
)
{
{
int
len
,
quote
;
int
len
,
quote
=
0
;
char
*
cmdline
,
*
p
,
**
arg
;
char
*
cmdline
,
*
p
,
**
arg
;
for
(
arg
=
argv
,
len
=
0
;
*
arg
;
arg
++
)
len
+=
strlen
(
*
arg
)
+
1
;
for
(
arg
=
argv
,
len
=
0
;
*
arg
;
arg
++
)
len
+=
strlen
(
*
arg
)
+
1
;
if
((
quote
=
(
strchr
(
argv
[
0
],
' '
)
!=
NULL
)))
len
+=
2
;
if
((
argv
[
0
])
&&
(
quote
=
(
strchr
(
argv
[
0
],
' '
)
!=
NULL
)))
len
+=
2
;
if
(
!
(
p
=
cmdline
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
)))
return
NULL
;
if
(
!
(
p
=
cmdline
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
)))
return
NULL
;
arg
=
argv
;
arg
=
argv
;
if
(
quote
)
if
(
quote
)
...
@@ -604,7 +607,7 @@ static char **build_envp( const char *env )
...
@@ -604,7 +607,7 @@ static char **build_envp( const char *env )
/***********************************************************************
/***********************************************************************
*
find
_wine_binary
*
exec
_wine_binary
*
*
* Locate the Wine binary to exec for a new Win32 process.
* Locate the Wine binary to exec for a new Win32 process.
*/
*/
...
...
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