aboutsummaryrefslogtreecommitdiffstats
path: root/subst.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2012-07-10 09:44:54 -0400
committerChet Ramey <chet.ramey@case.edu>2012-07-10 09:44:54 -0400
commit0b913689b8d913c98b193607870713832935e07d (patch)
tree540ba98d24e62069ce044161a4b1382bde2533ae /subst.c
parent8e9dc917992612dccbb4efd85f8afd58947948d2 (diff)
downloadandroid_external_bash-0b913689b8d913c98b193607870713832935e07d.tar.gz
android_external_bash-0b913689b8d913c98b193607870713832935e07d.tar.bz2
android_external_bash-0b913689b8d913c98b193607870713832935e07d.zip
Bash-4.2 patch 36
Diffstat (limited to 'subst.c')
-rw-r--r--subst.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/subst.c b/subst.c
index 1915120..937c71d 100644
--- a/subst.c
+++ b/subst.c
@@ -7922,7 +7922,7 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin
/* State flags */
int had_quoted_null;
- int has_dollar_at;
+ int has_dollar_at, temp_has_dollar_at;
int tflag;
int pflags; /* flags passed to param_expand */
@@ -8127,13 +8127,14 @@ add_string:
if (expanded_something)
*expanded_something = 1;
- has_dollar_at = 0;
+ temp_has_dollar_at = 0;
pflags = (word->flags & W_NOCOMSUB) ? PF_NOCOMSUB : 0;
if (word->flags & W_NOSPLIT2)
pflags |= PF_NOSPLIT2;
tword = param_expand (string, &sindex, quoted, expanded_something,
- &has_dollar_at, &quoted_dollar_at,
+ &temp_has_dollar_at, &quoted_dollar_at,
&had_quoted_null, pflags);
+ has_dollar_at += temp_has_dollar_at;
if (tword == &expand_wdesc_error || tword == &expand_wdesc_fatal)
{
@@ -8274,9 +8275,10 @@ add_twochars:
temp = (char *)NULL;
- has_dollar_at = 0;
+ temp_has_dollar_at = 0; /* XXX */
/* Need to get W_HASQUOTEDNULL flag through this function. */
- list = expand_word_internal (tword, Q_DOUBLE_QUOTES, 0, &has_dollar_at, (int *)NULL);
+ list = expand_word_internal (tword, Q_DOUBLE_QUOTES, 0, &temp_has_dollar_at, (int *)NULL);
+ has_dollar_at += temp_has_dollar_at;
if (list == &expand_word_error || list == &expand_word_fatal)
{