]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-4.4 patch 8
authorChet Ramey <chet.ramey@case.edu>
Fri, 20 Jan 2017 20:38:10 +0000 (15:38 -0500)
committerChet Ramey <chet.ramey@case.edu>
Fri, 20 Jan 2017 20:38:10 +0000 (15:38 -0500)
expr.c
patchlevel.h

diff --git a/expr.c b/expr.c
index 1ddb693cb4f5c433b32344c30e41f3de89e0ad18..172964a24a48eb321d1a325559bc7eaf28121fff 100644 (file)
--- a/expr.c
+++ b/expr.c
@@ -578,24 +578,23 @@ expcond ()
   rval = cval = explor ();
   if (curtok == QUES)          /* found conditional expr */
     {
-      readtok ();
-      if (curtok == 0 || curtok == COL)
-       evalerror (_("expression expected"));
       if (cval == 0)
        {
          set_noeval = 1;
          noeval++;
        }
 
+      readtok ();
+      if (curtok == 0 || curtok == COL)
+       evalerror (_("expression expected"));
+
       val1 = EXP_HIGHEST ();
 
       if (set_noeval)
        noeval--;
       if (curtok != COL)
        evalerror (_("`:' expected for conditional expression"));
-      readtok ();
-      if (curtok == 0)
-       evalerror (_("expression expected"));
+
       set_noeval = 0;
       if (cval)
        {
@@ -603,7 +602,11 @@ expcond ()
          noeval++;
        }
 
+      readtok ();
+      if (curtok == 0)
+       evalerror (_("expression expected"));
       val2 = expcond ();
+
       if (set_noeval)
        noeval--;
       rval = cval ? val1 : val2;
index deb9c5b74a5b0029aa4d05c25dd32d4ae378000b..16c8740455079ee12e9773dd1eb8860313fbdffd 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 7
+#define PATCHLEVEL 8
 
 #endif /* _PATCHLEVEL_H_ */