about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@zsh.org>2024-02-28 20:40:26 -0800
committerBart Schaefer <schaefer@zsh.org>2024-02-28 20:40:26 -0800
commit85172998f499cb789570714ffdd43f1ca3b53e58 (patch)
tree793f9ab6e74b256171e5aafa8e778e60fb1ea7f7 /Src
parent69c58874611a586c68be14ce7965029dc00f41b7 (diff)
downloadzsh-85172998f499cb789570714ffdd43f1ca3b53e58.tar.gz
zsh-85172998f499cb789570714ffdd43f1ca3b53e58.tar.xz
zsh-85172998f499cb789570714ffdd43f1ca3b53e58.zip
52619 (plus tests): no empty element when appending array to unset scalar
Diffstat (limited to 'Src')
-rw-r--r--Src/params.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/params.c b/Src/params.c
index 7c5e9d8ff..064dbd2bc 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -3355,7 +3355,7 @@ assignaparam(char *s, char **val, int flags)
 	} else if (!(PM_TYPE(v->pm->node.flags) & (PM_ARRAY|PM_HASHED)) &&
 		 !(v->pm->node.flags & (PM_SPECIAL|PM_TIED))) {
 	    int uniq = v->pm->node.flags & PM_UNIQUE;
-	    if (flags & ASSPM_AUGMENT) {
+	    if ((flags & ASSPM_AUGMENT) && !(v->pm->node.flags & PM_UNSET)) {
 	    	/* insert old value at the beginning of the val array */
 		char **new;
 		int lv = arrlen(val);