34788: refine errflag handling in cmd_or_math()

This commit is contained in:
Barton E. Schaefer 2015-03-27 11:54:55 -07:00
parent 26cfae830c
commit ab4065623a
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2015-03-27 Barton E. Schaefer <schaefer@zsh.org>
* 34788: Src/lex.c: refine errflag handling in cmd_or_math()
2015-03-27 Peter Stephenson <p.stephenson@samsung.com>
* Han Pingtian: 34785: Doc/Zsh/options.yo: fix typo in SHINSTDIN.

View file

@ -513,7 +513,7 @@ cmd_or_math(int cs_type)
/* else unsuccessful: unget the whole thing */
hungetc(c);
lexstop = 0;
while (lexbuf.len > oldlen && !errflag) {
while (lexbuf.len > oldlen && !(errflag & ERRFLAG_ERROR)) {
lexbuf.len--;
hungetc(itok(*--lexbuf.ptr) ?
ztokens[*lexbuf.ptr - Pound] : *lexbuf.ptr);