summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2015-11-30 03:21:28 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2015-11-30 03:42:46 +0000
commit4202c90b6d6f1f08cdaf56180f589a00395c32be (patch)
treef9a06f7d951ef0fcc5fb2b4759d13d68a771391c /Src
parent503fa5cd9eaf9f8ecc7fcd485ac07b313cec5a53 (diff)
downloadzsh-4202c90b6d6f1f08cdaf56180f589a00395c32be.tar.gz
zsh-4202c90b6d6f1f08cdaf56180f589a00395c32be.tar.xz
zsh-4202c90b6d6f1f08cdaf56180f589a00395c32be.zip
37254: No functional change: change code layout in preparation for 37253.
Diffstat (limited to 'Src')
-rw-r--r--Src/params.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Src/params.c b/Src/params.c
index ee1527153..d8bf83d0e 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -2537,6 +2537,7 @@ setarrvalue(Value v, char **val)
 	freearray(val);
 	return;
     }
+
     if (v->start == 0 && v->end == -1) {
 	if (PM_TYPE(v->pm->node.flags) == PM_HASHED)
 	    arrhashsetfn(v->pm, val, 0);
@@ -2545,18 +2546,17 @@ setarrvalue(Value v, char **val)
     } else if (v->start == -1 && v->end == 0 &&
     	    PM_TYPE(v->pm->node.flags) == PM_HASHED) {
     	arrhashsetfn(v->pm, val, 1);
+    } else if ((PM_TYPE(v->pm->node.flags) == PM_HASHED)) {
+	freearray(val);
+	zerr("%s: attempt to set slice of associative array",
+	     v->pm->node.nam);
+	return;
     } else {
 	char **old, **new, **p, **q, **r;
 	int pre_assignment_length;
 	int post_assignment_length;
 	int i;
 
-	if ((PM_TYPE(v->pm->node.flags) == PM_HASHED)) {
-	    freearray(val);
-	    zerr("%s: attempt to set slice of associative array",
-		 v->pm->node.nam);
-	    return;
-	}
 	if ((v->flags & VALFLAG_INV) && unset(KSHARRAYS)) {
 	    if (v->start > 0)
 		v->start--;