From 2260fe045e44864c3e6c8f0b7bdd8ba3e5b8d7c2 Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Thu, 7 Mar 2002 16:20:00 +0000 Subject: [PATCH] Fix parsing of binary infix operators of test builtin. --- ChangeLog | 11 ++++++++++- Src/parse.c | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9884e965f..9f05e92d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2002-03-07 Bart Schaefer + + * 16737 (tweaked): Src/parse.c: fix parsing of binary infix + operators of builtin `test' when there are more than three + arguments. + + * unposted: Etc/BUGS: stop mentioning a bug that's been fixed + since 3.1.6. + 2002-03-07 Adam Spiers * 16779: Completion/Unix/Command/_mysqldiff, @@ -74,7 +83,7 @@ 2002-02-28 Bart Schaefer - * 16748: Completion/Zsh/Command/_zle: Fix infinite loop + * 16748: Completion/Zsh/Command/_zle: fix infinite loop introduced by 16464. 2002-02-25 Sven Wischnowsky diff --git a/Src/parse.c b/Src/parse.c index 48332733b..5d78881c5 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -1859,9 +1859,9 @@ par_cond_2(void) condlex(); return par_cond_double(dupstring("-n"), s1); } - if (testargs[1] && !testargs[2]) { + if (testargs[1]) { /* three arguments: if the second argument is a binary operator, * - * perform that binary test on the first and the trird argument */ + * perform that binary test on the first and the third argument */ if (!strcmp(*testargs, "=") || !strcmp(*testargs, "==") || !strcmp(*testargs, "!=") ||