]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-5.1 patch 16: fix interpretation of multiple instances of ! in [[ conditional...
authorChet Ramey <chet.ramey@case.edu>
Tue, 4 Jan 2022 22:03:45 +0000 (17:03 -0500)
committerChet Ramey <chet.ramey@case.edu>
Tue, 4 Jan 2022 22:03:45 +0000 (17:03 -0500)
parse.y
patchlevel.h
y.tab.c

diff --git a/parse.y b/parse.y
index f25575b58b7cc5ad39f27fc95bde0b50fb0c9ac8..f4168c7cd40158c4c1a89063ff179b644bfaf1c5 100644 (file)
--- 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))
     {
index 252e0819815ff898b8c0d62b2919bce240552821..3c226949a0b5cc93e8b24335cd206da5db16d18c 100644 (file)
@@ -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 c11d7aaaad58a93196cb6cf19ca12146125068cf..78b38250bd75b72fe818506bc5fa6a74a3eea2ef 100644 (file)
--- 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))
     {