zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: pws-21: Creating array slices by assignment
@ 1999-06-14 17:12 Bart Schaefer
  0 siblings, 0 replies; only message in thread
From: Bart Schaefer @ 1999-06-14 17:12 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-06-14 17:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-14 17:12 PATCH: pws-21: Creating array slices by assignment Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).