1
0
Fork 0
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:
Bart Schaefer 2004-10-02 21:44:13 +00:00
parent f986922ac2
commit 684da738b0
2 changed files with 11 additions and 2 deletions

View file

@ -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 {