mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-27 16:50:58 +01:00
20418: report parse error rather than crash on unfinished pipelines.
This commit is contained in:
parent
f986922ac2
commit
684da738b0
2 changed files with 11 additions and 2 deletions
|
|
@ -729,7 +729,9 @@ par_pline(int *complex)
|
|||
ecbuf[p] = WCB_PIPE(WC_PIPE_MID, (line >= 0 ? line + 1 : 0));
|
||||
ecispace(p + 1, 1);
|
||||
ecbuf[p + 1] = ecused - 1 - p;
|
||||
par_pline(complex);
|
||||
if (!par_pline(complex)) {
|
||||
tok = LEXERR;
|
||||
}
|
||||
cmdpop();
|
||||
return 1;
|
||||
} else if (tok == BARAMP) {
|
||||
|
|
@ -750,7 +752,9 @@ par_pline(int *complex)
|
|||
ecbuf[p] = WCB_PIPE(WC_PIPE_MID, (line >= 0 ? line + 1 : 0));
|
||||
ecispace(p + 1, 1);
|
||||
ecbuf[p + 1] = ecused - 1 - p;
|
||||
par_pline(complex);
|
||||
if (!par_pline(complex)) {
|
||||
tok = LEXERR;
|
||||
}
|
||||
cmdpop();
|
||||
return 1;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue