[CMD] Syntax errors during parsing of batch parameters expansion, or FOR and IF commands, are fatal, and batch execution should stop.

- To this purpose use the ParseErrorEx() that correctly sets the
  bParseError flag, and return the partially-parsed command so that
  it gets echoed as well for diagnostics purposes (Windows-compatible).

- Any other parameters specified after (or before) the '/?' switch for
  the FOR and IF commands, are considered fatal syntax errors as well,
  thus we employ the ParseErrorEx() as well.
This commit is contained in:
Hermès Bélusca-Maïto 2020-05-18 02:16:40 +02:00
parent 6eb1cae348
commit 495c82ccde
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
3 changed files with 11 additions and 3 deletions

View file

@ -59,7 +59,7 @@ INT cmd_if(LPTSTR param)
return 0;
}
error_syntax(param);
ParseErrorEx(param);
return 1;
}