mirror of
https://github.com/reactos/reactos.git
synced 2026-06-24 22:19:11 +08:00
[CMD] GOTO: Fix label parsing.
We note two things, when CMD searches for the corresponding label in the batch file: - the first character of the line is always ignored, unless it's a colon; - the escape caret ^ is supported and interpreted. Fixes some cmd_winetests.
This commit is contained in:
@@ -131,7 +131,7 @@ static LPTSTR BatchParams(LPTSTR s1, LPTSTR s2)
|
||||
BOOL inquotes = FALSE;
|
||||
|
||||
/* Find next parameter */
|
||||
while (_istspace(*s2) || (*s2 && _tcschr(_T(",;="), *s2)))
|
||||
while (_istspace(*s2) || (*s2 && _tcschr(STANDARD_SEPS, *s2)))
|
||||
s2++;
|
||||
if (!*s2)
|
||||
break;
|
||||
@@ -139,7 +139,7 @@ static LPTSTR BatchParams(LPTSTR s1, LPTSTR s2)
|
||||
/* Copy it */
|
||||
do
|
||||
{
|
||||
if (!inquotes && (_istspace(*s2) || _tcschr(_T(",;="), *s2)))
|
||||
if (!inquotes && (_istspace(*s2) || _tcschr(STANDARD_SEPS, *s2)))
|
||||
break;
|
||||
inquotes ^= (*s2 == _T('"'));
|
||||
*s1++ = *s2++;
|
||||
|
||||
Reference in New Issue
Block a user