From aa34d2f1652f31940534864c1a8ef5404c004638 Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Wed, 6 May 2015 07:46:15 -0700 Subject: 35046: unwind cmdstack when erroring out of lexing a parameter expansion in braces --- Src/lex.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Src/lex.c') diff --git a/Src/lex.c b/Src/lex.c index c929bb9ba..5b6d3a69b 100644 --- a/Src/lex.c +++ b/Src/lex.c @@ -1345,8 +1345,11 @@ gettokstr(int c, int sub) break; } brk: - if (errflag) + if (errflag) { + while(bct-- >= in_brace_param) + cmdpop(); return LEXERR; + } hungetc(c); if (unmatched) zerr("unmatched %c", unmatched); -- cgit 1.4.1