about summary refs log tree commit diff
path: root/Src/subst.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/subst.c')
-rw-r--r--Src/subst.c6
1 files changed, 4 insertions, 2 deletions
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)) {