From bd50a3c516f3e19c444c40987e657d1be78583c0 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 26 Jun 2006 10:04:09 +0000 Subject: 22516: error in func() didn't pop command stack --- Src/parse.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Src/parse.c') diff --git a/Src/parse.c b/Src/parse.c index d436eef18..c67561be2 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -1672,6 +1672,7 @@ par_simple(int *complex, int nr) lineno += oldlineno; ecnpats = onp; ecssub = oecssub; + cmdpop(); YYERROR(oecused); } yylex(); @@ -1683,8 +1684,10 @@ par_simple(int *complex, int nr) pl = ecadd(WCB_PIPE(WC_PIPE_END, 0)); par_cmd(&c); - if (!c) + if (!c) { + cmdpop(); YYERROR(oecused); + } set_sublist_code(sl, WC_SUBLIST_END, 0, ecused - 1 - sl, c); set_list_code(ll, (Z_SYNC | Z_END), c); -- cgit 1.4.1