aboutsummaryrefslogtreecommitdiffstats
path: root/variables.c
diff options
context:
space:
mode:
authorJari Aalto <jari.aalto@cante.net>2008-11-18 13:15:12 +0000
committerJari Aalto <jari.aalto@cante.net>2009-09-12 16:46:59 +0000
commitf1be666c7d78939ad775078d290bec2758fa29a2 (patch)
tree4f4b8ed6eb250653e0bb44685eb5ffa9d3805e91 /variables.c
parent0628567a28f3510f506ae46cb9b24b73a6d2dc5d (diff)
downloadandroid_external_bash-f1be666c7d78939ad775078d290bec2758fa29a2.tar.gz
android_external_bash-f1be666c7d78939ad775078d290bec2758fa29a2.tar.bz2
android_external_bash-f1be666c7d78939ad775078d290bec2758fa29a2.zip
Imported from ../bash-3.2.48.tar.gz.
Diffstat (limited to 'variables.c')
-rw-r--r--variables.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/variables.c b/variables.c
index 5fd9d0e..725cfa6 100644
--- a/variables.c
+++ b/variables.c
@@ -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);
}