|
|
3fb13f |
From b9f81c2977b82490cd4dc70b0bb292bfbf86bd2c Mon Sep 17 00:00:00 2001
|
|
|
3fb13f |
From: Chet Ramey <chet.ramey@case.edu>
|
|
|
3fb13f |
Date: Fri, 20 Jan 2017 15:38:10 -0500
|
|
|
3fb13f |
Subject: [PATCH] Bash-4.4 patch 8
|
|
|
3fb13f |
|
|
|
3fb13f |
---
|
|
|
3fb13f |
expr.c | 15 +++++++++------
|
|
|
3fb13f |
patchlevel.h | 2 +-
|
|
|
3fb13f |
2 files changed, 10 insertions(+), 7 deletions(-)
|
|
|
3fb13f |
|
|
|
3fb13f |
diff --git a/expr.c b/expr.c
|
|
|
3fb13f |
index 1ddb693..172964a 100644
|
|
|
3fb13f |
--- a/expr.c
|
|
|
3fb13f |
+++ b/expr.c
|
|
|
3fb13f |
@@ -578,24 +578,23 @@ expcond ()
|
|
|
3fb13f |
rval = cval = explor ();
|
|
|
3fb13f |
if (curtok == QUES) /* found conditional expr */
|
|
|
3fb13f |
{
|
|
|
3fb13f |
- readtok ();
|
|
|
3fb13f |
- if (curtok == 0 || curtok == COL)
|
|
|
3fb13f |
- evalerror (_("expression expected"));
|
|
|
3fb13f |
if (cval == 0)
|
|
|
3fb13f |
{
|
|
|
3fb13f |
set_noeval = 1;
|
|
|
3fb13f |
noeval++;
|
|
|
3fb13f |
}
|
|
|
3fb13f |
|
|
|
3fb13f |
+ readtok ();
|
|
|
3fb13f |
+ if (curtok == 0 || curtok == COL)
|
|
|
3fb13f |
+ evalerror (_("expression expected"));
|
|
|
3fb13f |
+
|
|
|
3fb13f |
val1 = EXP_HIGHEST ();
|
|
|
3fb13f |
|
|
|
3fb13f |
if (set_noeval)
|
|
|
3fb13f |
noeval--;
|
|
|
3fb13f |
if (curtok != COL)
|
|
|
3fb13f |
evalerror (_("`:' expected for conditional expression"));
|
|
|
3fb13f |
- readtok ();
|
|
|
3fb13f |
- if (curtok == 0)
|
|
|
3fb13f |
- evalerror (_("expression expected"));
|
|
|
3fb13f |
+
|
|
|
3fb13f |
set_noeval = 0;
|
|
|
3fb13f |
if (cval)
|
|
|
3fb13f |
{
|
|
|
3fb13f |
@@ -603,7 +602,11 @@ expcond ()
|
|
|
3fb13f |
noeval++;
|
|
|
3fb13f |
}
|
|
|
3fb13f |
|
|
|
3fb13f |
+ readtok ();
|
|
|
3fb13f |
+ if (curtok == 0)
|
|
|
3fb13f |
+ evalerror (_("expression expected"));
|
|
|
3fb13f |
val2 = expcond ();
|
|
|
3fb13f |
+
|
|
|
3fb13f |
if (set_noeval)
|
|
|
3fb13f |
noeval--;
|
|
|
3fb13f |
rval = cval ? val1 : val2;
|
|
|
3fb13f |
diff --git a/patchlevel.h b/patchlevel.h
|
|
|
3fb13f |
index deb9c5b..16c8740 100644
|
|
|
3fb13f |
--- a/patchlevel.h
|
|
|
3fb13f |
+++ b/patchlevel.h
|
|
|
3fb13f |
@@ -25,6 +25,6 @@
|
|
|
3fb13f |
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
|
|
|
3fb13f |
looks for to find the patch level (for the sccs version string). */
|
|
|
3fb13f |
|
|
|
3fb13f |
-#define PATCHLEVEL 7
|
|
|
3fb13f |
+#define PATCHLEVEL 8
|
|
|
3fb13f |
|
|
|
3fb13f |
#endif /* _PATCHLEVEL_H_ */
|
|
|
3fb13f |
--
|
|
|
3fb13f |
2.9.3
|
|
|
3fb13f |
|