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
508c6e6c
Commit
508c6e6c
authored
Apr 05, 2006
by
qingdoa daoo
Committed by
Alexandre Julliard
Apr 06, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Append extension(.exe) for _spawnve argument.
parent
9603ee07
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
2 deletions
+30
-2
process.c
dlls/msvcrt/process.c
+30
-2
No files found.
dlls/msvcrt/process.c
View file @
508c6e6c
...
...
@@ -442,13 +442,41 @@ MSVCRT_intptr_t _spawnve(int flags, const char* name, const char* const* argv,
{
char
*
args
=
msvcrt_argvtos
(
argv
,
' '
);
char
*
envs
=
msvcrt_argvtos
(
envv
,
0
);
const
char
*
fullname
=
name
;
char
fullname
[
MAX_PATH
];
const
char
*
p
;
int
len
;
MSVCRT_intptr_t
ret
=
-
1
;
FIXME
(
":not translating name %s to locate program
\n
"
,
fullname
);
TRACE
(
":call (%s), params (%s), env (%s)
\n
"
,
debugstr_a
(
name
),
debugstr_a
(
args
),
envs
?
"Custom"
:
"Null"
);
/* no check for NULL name.
native doesn't do it */
p
=
memchr
(
name
,
'\0'
,
MAX_PATH
);
if
(
!
p
)
p
=
name
+
MAX_PATH
-
1
;
len
=
p
-
name
;
/* extra-long names are silently truncated. */
memcpy
(
fullname
,
name
,
len
);
for
(
p
--
;
p
>=
name
;
p
--
)
{
if
(
*
p
==
'\\'
||
*
p
==
'/'
||
*
p
==
':'
||
*
p
==
'.'
)
break
;
}
/* if no extension is given, assume .exe */
if
(
(
p
<
name
||
*
p
!=
'.'
)
&&
len
<=
MAX_PATH
-
5
)
{
FIXME
(
"only trying .exe when no extension given
\n
"
);
memcpy
(
fullname
+
len
,
".exe"
,
4
);
len
+=
4
;
}
fullname
[
len
]
=
'\0'
;
if
(
args
)
{
ret
=
msvcrt_spawn
(
flags
,
fullname
,
args
,
envs
);
...
...
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