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
68df9182
Commit
68df9182
authored
Dec 19, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Check for tabs too when extracting the program name
(reported by Vitaliy Margolen).
parent
4f462323
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
process.c
dlls/kernel/process.c
+11
-9
No files found.
dlls/kernel/process.c
View file @
68df9182
...
...
@@ -1736,6 +1736,7 @@ static LPWSTR get_file_name( LPCWSTR appname, LPWSTR cmdline, LPWSTR buffer,
WCHAR
*
name
,
*
pos
,
*
ret
=
NULL
;
const
WCHAR
*
p
;
BOOL
got_space
;
/* if we have an app name, everything is easy */
...
...
@@ -1780,26 +1781,27 @@ static LPWSTR get_file_name( LPCWSTR appname, LPWSTR cmdline, LPWSTR buffer,
return
NULL
;
pos
=
name
;
p
=
cmdline
;
got_space
=
FALSE
;
while
(
*
p
)
{
do
*
pos
++
=
*
p
++
;
while
(
*
p
&&
*
p
!=
' '
);
do
*
pos
++
=
*
p
++
;
while
(
*
p
&&
*
p
!=
' '
&&
*
p
!=
'\t'
);
*
pos
=
0
;
if
(
find_exe_file
(
name
,
buffer
,
buflen
,
handle
))
{
ret
=
cmdline
;
break
;
}
if
(
*
p
)
got_space
=
TRUE
;
}
if
(
!
ret
||
!
strchrW
(
name
,
' '
))
goto
done
;
/* no change necessary */
/* now build a new command-line with quotes */
if
(
!
(
ret
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
strlenW
(
cmdline
)
+
3
)
*
sizeof
(
WCHAR
)
)))
goto
done
;
sprintfW
(
ret
,
quotesW
,
name
);
strcatW
(
ret
,
p
);
if
(
ret
&&
got_space
)
/* now build a new command-line with quotes */
{
if
(
!
(
ret
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
strlenW
(
cmdline
)
+
3
)
*
sizeof
(
WCHAR
)
)))
goto
done
;
sprintfW
(
ret
,
quotesW
,
name
);
strcatW
(
ret
,
p
);
}
done:
HeapFree
(
GetProcessHeap
(),
0
,
name
);
...
...
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