1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-18 00:51:07 +02:00

35046: unwind cmdstack when erroring out of lexing a parameter expansion in braces

This commit is contained in:
Barton E. Schaefer 2015-05-06 07:46:15 -07:00
parent f29895cc08
commit aa34d2f165
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2015-05-06 Barton E. Schaefer <schaefer@zsh.org>
* 35046: Src/lex.c: properly unwind cmdstack when erroring out of
lexing a parameter expansion in braces
2015-05-06 Peter Stephenson <p.stephenson@samsung.com>
* c.f. 35041 (Axel Beckert): Doc/Zsh/zle.yo: typo.

View file

@ -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);