aboutsummaryrefslogtreecommitdiffstats
path: root/subst.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2012-05-07 16:22:49 -0400
committerChet Ramey <chet.ramey@case.edu>2012-05-07 16:22:49 -0400
commit6d41b71587a48f90a555846477b2ff6a976d766d (patch)
tree54cb661d48bc28bec5ec07dca99501519115fd29 /subst.c
parent6c19148d3350504ff170ca6fabc9b120ad3f3378 (diff)
downloadandroid_external_bash-6d41b71587a48f90a555846477b2ff6a976d766d.tar.gz
android_external_bash-6d41b71587a48f90a555846477b2ff6a976d766d.tar.bz2
android_external_bash-6d41b71587a48f90a555846477b2ff6a976d766d.zip
Bash-4.2 patch 25
Diffstat (limited to 'subst.c')
-rw-r--r--subst.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/subst.c b/subst.c
index 9feaa9c..c9a0678 100644
--- a/subst.c
+++ b/subst.c
@@ -366,6 +366,11 @@ dump_word_flags (flags)
f &= ~W_ASSNBLTIN;
fprintf (stderr, "W_ASSNBLTIN%s", f ? "|" : "");
}
+ if (f & W_ASSNGLOBAL)
+ {
+ f &= ~W_ASSNGLOBAL;
+ fprintf (stderr, "W_ASSNGLOBAL%s", f ? "|" : "");
+ }
if (f & W_COMPASSIGN)
{
f &= ~W_COMPASSIGN;
@@ -2803,7 +2808,7 @@ do_assignment_internal (word, expand)
}
else if (assign_list)
{
- if (word->flags & W_ASSIGNARG)
+ if ((word->flags & W_ASSIGNARG) && (word->flags & W_ASSNGLOBAL) == 0)
aflags |= ASS_MKLOCAL;
if (word->flags & W_ASSIGNASSOC)
aflags |= ASS_MKASSOC;