Commit 0092390c authored by Ulrich Weigand's avatar Ulrich Weigand Committed by Alexandre Julliard

Bugfix: cope with quoted arguments for CreateProcess().

parent 919a8109
...@@ -752,14 +752,12 @@ static void get_executable_name( LPCSTR line, LPSTR name, int namelen, ...@@ -752,14 +752,12 @@ static void get_executable_name( LPCSTR line, LPSTR name, int namelen,
int len = 0; int len = 0;
LPCSTR p = NULL, pcmd = NULL; LPCSTR p = NULL, pcmd = NULL;
if ((p = strchr(line, '"'))) while ( *line == ' ' ) line++;
if ( *line == '"' )
{ {
p++; /* skip '"' */ line++; /* skip '"' */
line = p; if ((pcmd = strchr(line, '"'))) /* closing '"' available, too ? */
if ((pcmd = strchr(p, '"'))) { /* closing '"' available, too ? */ len = ++pcmd - line;
pcmd++;
len = (int)pcmd - (int)p;
}
} }
if (!len) if (!len)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment