Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 2/3] No functional change: change code layout in preparation for the next change.
- X-seq: zsh-workers 37254
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH 2/3] No functional change: change code layout in preparation for the next change.
- Date: Mon, 30 Nov 2015 03:21:28 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=aAv zn6Aaml6BJBQ6Lf43Sx0BTe4=; b=WwRdezaUuTvxHz1jZfFLPbPKhsKD8lb1MiG dDx+mIrrVaUT1Azk2LQmcngUbdf1S6BPKXyOCFYZlZ+wGkwTBfPlm48WxVtx4MCf lKmQZzhR3aLDTYhIvV94BnX5ibO/yfmKwqO6rfu2vJ4GIHbKo+EwNVjVuHgfPeHv x+sUlA68=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=aA vzn6Aaml6BJBQ6Lf43Sx0BTe4=; b=OzN5E4fAJLV3OnnCVl73Wg105ZXy/HHEKD 5Q4u4nVa4AOVqjwf3xugRWRmieiKgA6HzA9SB0xHfDMExehCtl1+Isb6RIwvt+tx Rgzes85SNFngoLiZtB+hOPzHCMbuNlrp7SeF5gkd/50URllW+oZusYflET/s0RpH 5iN6nMv1U=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
---
Src/params.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Src/params.c b/Src/params.c
index ee15271..d8bf83d 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--;
--
2.1.4
Messages sorted by:
Reverse Date,
Date,
Thread,
Author