]> git.ipfire.org Git - thirdparty/bash.git/blobdiff - variables.c
Imported from ../bash-3.2.48.tar.gz.
[thirdparty/bash.git] / variables.c
index 5fd9d0e992e30ff419df63af981d1081770f732e..725cfa6927867316169b16c2296be77bbc29e70d 100644 (file)
@@ -1821,11 +1821,17 @@ make_variable_value (var, value, flags)
          oval = value_cell (var);
          lval = evalexp (oval, &expok);        /* ksh93 seems to do this */
          if (expok == 0)
-           jump_to_top_level (DISCARD);
+           {
+             top_level_cleanup ();
+             jump_to_top_level (DISCARD);
+           }
        }
       rval = evalexp (value, &expok);
       if (expok == 0)
-       jump_to_top_level (DISCARD);
+       {
+         top_level_cleanup ();
+         jump_to_top_level (DISCARD);
+       }
       if (flags & ASS_APPEND)
        rval += lval;
       retval = itos (rval);
@@ -3452,9 +3458,11 @@ push_func_var (data)
       if (shell_variables == global_variables)
        var->attributes &= ~(att_tempvar|att_propagate);
       else
-        shell_variables->flags |= VC_HASTMPVAR;
+       shell_variables->flags |= VC_HASTMPVAR;
       v->attributes |= var->attributes;
     }
+  else
+    stupidly_hack_special_variables (var->name);       /* XXX */
 
   dispose_variable (var);
 }
@@ -3541,6 +3549,8 @@ push_exported_var (data)
        var->attributes &= ~att_propagate;
       v->attributes |= var->attributes;
     }
+  else
+    stupidly_hack_special_variables (var->name);       /* XXX */
 
   dispose_variable (var);
 }