Imported from ../bash-3.2.48.tar.gz.
[platform/upstream/bash.git] / expr.c
diff --git a/expr.c b/expr.c
index 418f48d..a5cb038 100644 (file)
--- a/expr.c
+++ b/expr.c
@@ -286,6 +286,8 @@ expr_unwind ()
       free (expr_stack[expr_depth]);
     }
   free (expr_stack[expr_depth]);       /* free the allocated EXPR_CONTEXT */
+
+  noeval = 0;  /* XXX */
 }
 
 static void
@@ -319,6 +321,7 @@ evalexp (expr, validp)
   procenv_t oevalbuf;
 
   val = 0;
+  noeval = 0;
 
   FASTCOPY (evalbuf, oevalbuf, sizeof (evalbuf));
 
@@ -517,7 +520,8 @@ expcond ()
          set_noeval = 1;
          noeval++;
        }
-      val2 = explor ();
+
+      val2 = expcond ();
       if (set_noeval)
        noeval--;
       rval = cval ? val1 : val2;
@@ -929,6 +933,7 @@ expr_streval (tok, e)
       if (interactive_shell)
        {
          expr_unwind ();
+         top_level_cleanup ();
          jump_to_top_level (DISCARD);
        }
       else