about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Src/subst.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 2aafe096f..0170dc6ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,12 @@
 	* Paulo Andrade: 40260: Src/prompt.c: Set newly allocated
 	space in prompt buffer to zero as it may be tested.
 
+2017-01-01  Barton E. Schaefer  <schaefer@zsh.org>
+
+	* users/22319: Src/subst.c: ${ary1:^ary2} should not change
+	the isarr state of the expansion of ary1 unless ary1 is made
+	from a scalar, lest semantics of (@) in double quotes be lost.
+
 2016-12-30  Barton E. Schaefer  <schaefer@zsh.org>
 
 	* 40248: Src/hist.c: suppress errors from zshaddhistoryhook,
diff --git a/Src/subst.c b/Src/subst.c
index 64b440027..737a0a902 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -3066,7 +3066,10 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags,
 		if (sval)
 		    zip = hmkarray(sval);
 	    }
-	    if (!isarr) aval = mkarray(val);
+	    if (!isarr) {
+		aval = mkarray(val);
+		isarr = 1;
+	    }
 	    if (zip) {
 		char **out;
 		int alen, ziplen, outlen, i = 0;
@@ -3089,7 +3092,6 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags,
 		    out[i*2] = NULL;
 		    aval = out;
 		    copied = 1;
-		    isarr = 1;
 		}
 	    } else {
 		if (unset(UNSET)) {