From: Chet Ramey Date: Tue, 4 Jan 2022 22:03:45 +0000 (-0500) Subject: Bash-5.1 patch 16: fix interpretation of multiple instances of ! in [[ conditional... X-Git-Tag: bash-5.2-alpha~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9439ce094c9aa7557a9d53ac7b412a23aa66e36b;p=thirdparty%2Fbash.git Bash-5.1 patch 16: fix interpretation of multiple instances of ! in [[ conditional commands --- diff --git a/parse.y b/parse.y index f25575b58..f4168c7cd 100644 --- a/parse.y +++ b/parse.y @@ -4796,7 +4796,7 @@ cond_term () dispose_word (yylval.word); /* not needed */ term = cond_term (); if (term) - term->flags |= CMD_INVERT_RETURN; + term->flags ^= CMD_INVERT_RETURN; } else if (tok == WORD && yylval.word->word[0] == '-' && yylval.word->word[1] && yylval.word->word[2] == 0 && test_unop (yylval.word->word)) { diff --git a/patchlevel.h b/patchlevel.h index 252e08198..3c226949a 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -25,6 +25,6 @@ regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh looks for to find the patch level (for the sccs version string). */ -#define PATCHLEVEL 15 +#define PATCHLEVEL 16 #endif /* _PATCHLEVEL_H_ */ diff --git a/y.tab.c b/y.tab.c index c11d7aaaa..78b38250b 100644 --- a/y.tab.c +++ b/y.tab.c @@ -7090,7 +7090,7 @@ cond_term () dispose_word (yylval.word); /* not needed */ term = cond_term (); if (term) - term->flags |= CMD_INVERT_RETURN; + term->flags ^= CMD_INVERT_RETURN; } else if (tok == WORD && yylval.word->word[0] == '-' && yylval.word->word[1] && yylval.word->word[2] == 0 && test_unop (yylval.word->word)) {