diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | Src/builtin.c | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 4f6d98856..8ecc79fe9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-09-02 Peter Stephenson <pws@csr.com> + + * 27240: Src/builtin.c: 27079 caused later use of tokstr and tok + to be invalid. + 2009-08-28 Peter Stephenson <pws@csr.com> * 27233: Completion/Base/Utility/_values, @@ -12106,5 +12111,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.4765 $ +* $Revision: 1.4766 $ ***************************************************** diff --git a/Src/builtin.c b/Src/builtin.c index 2d5489c21..f032230b6 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -5818,17 +5818,19 @@ bin_test(char *name, char **argv, UNUSED(Options ops), int func) testlex(); prog = parse_cond(); condlex = zshlex; - lexrestore(); if (errflag) { errflag = 0; + lexrestore(); return 1; } if (!prog || tok == LEXERR) { zwarnnam(name, tokstr ? "parse error" : "argument expected"); + lexrestore(); return 1; } + lexrestore(); if (*curtestarg) { zwarnnam(name, "too many arguments"); |