Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: pws-21: Creating array slices by assignment
- X-seq: zsh-workers 6628
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: pws-21: Creating array slices by assignment
- Date: Mon, 14 Jun 1999 17:12:44 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Assignments like x[2,5]=() where x was not yet set, caused a crash.
Index: Src/params.c
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-3.1/Src/params.c,v
retrieving revision 1.43
diff -u -r1.43 params.c
--- params.c 1999/06/10 16:27:40 1.43
+++ params.c 1999/06/14 17:10:21
@@ -1628,7 +1628,7 @@
if (!(v = getvalue(&s, 1)))
createparam(t, PM_ARRAY);
*ss = '[';
- if (PM_TYPE(v->pm->flags) == PM_HASHED) {
+ if (v && PM_TYPE(v->pm->flags) == PM_HASHED) {
zerr("attempt to set slice of associative array", NULL, 0);
freearray(val);
errflag = 1;
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author