mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-05 18:09:24 +00:00
Bugfix: cope with quoted arguments for CreateProcess().
This commit is contained in:
parent
919a8109aa
commit
0092390cd6
|
@ -752,14 +752,12 @@ static void get_executable_name( LPCSTR line, LPSTR name, int namelen,
|
|||
int len = 0;
|
||||
LPCSTR p = NULL, pcmd = NULL;
|
||||
|
||||
if ((p = strchr(line, '"')))
|
||||
while ( *line == ' ' ) line++;
|
||||
if ( *line == '"' )
|
||||
{
|
||||
p++; /* skip '"' */
|
||||
line = p;
|
||||
if ((pcmd = strchr(p, '"'))) { /* closing '"' available, too ? */
|
||||
pcmd++;
|
||||
len = (int)pcmd - (int)p;
|
||||
}
|
||||
line++; /* skip '"' */
|
||||
if ((pcmd = strchr(line, '"'))) /* closing '"' available, too ? */
|
||||
len = ++pcmd - line;
|
||||
}
|
||||
|
||||
if (!len)
|
||||
|
|
Loading…
Reference in a new issue