mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-01-16 09:30:00 +00:00
Fix for command line with multiple spaces between args. (#981)
This commit is contained in:
parent
35b83765db
commit
1b8d26051e
@ -52,7 +52,7 @@ bool g_bHookAltGrControl = false;
|
||||
|
||||
static LPSTR GetCurrArg(LPSTR lpCmdLine)
|
||||
{
|
||||
if(*lpCmdLine == '\"')
|
||||
if (*lpCmdLine == '\"')
|
||||
lpCmdLine++;
|
||||
|
||||
return lpCmdLine;
|
||||
@ -62,9 +62,9 @@ static LPSTR GetNextArg(LPSTR lpCmdLine)
|
||||
{
|
||||
int bInQuotes = 0;
|
||||
|
||||
while(*lpCmdLine)
|
||||
while (*lpCmdLine)
|
||||
{
|
||||
if(*lpCmdLine == '\"')
|
||||
if (*lpCmdLine == '\"')
|
||||
{
|
||||
bInQuotes ^= 1;
|
||||
if(!bInQuotes)
|
||||
@ -74,9 +74,12 @@ static LPSTR GetNextArg(LPSTR lpCmdLine)
|
||||
}
|
||||
}
|
||||
|
||||
if((*lpCmdLine == ' ') && !bInQuotes)
|
||||
if ((*lpCmdLine == ' ') && !bInQuotes)
|
||||
{
|
||||
*lpCmdLine++ = 0x00;
|
||||
|
||||
while ((*lpCmdLine == ' ')) // Skip multiple spaces between args
|
||||
lpCmdLine++;
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user