From: Chet Ramey Date: Fri, 20 Jan 2017 20:38:10 +0000 (-0500) Subject: Bash-4.4 patch 8 X-Git-Tag: bash-5.0-alpha~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b9f81c2977b82490cd4dc70b0bb292bfbf86bd2c;p=thirdparty%2Fbash.git Bash-4.4 patch 8 --- diff --git a/expr.c b/expr.c index 1ddb693cb..172964a24 100644 --- 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; diff --git a/patchlevel.h b/patchlevel.h index deb9c5b74..16c874045 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 7 +#define PATCHLEVEL 8 #endif /* _PATCHLEVEL_H_ */