From 0092390cd64fb5fa6e27b19477ebb13f39c800fa Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Mon, 22 Mar 1999 17:47:36 +0000 Subject: [PATCH] Bugfix: cope with quoted arguments for CreateProcess(). --- loader/module.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/loader/module.c b/loader/module.c index 578b0b38c83..86cc727d487 100644 --- a/loader/module.c +++ b/loader/module.c @@ -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)