Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh-3.1.5-pws-18 substitution bug ?



Jens Schleusener wrote:

> between versions zsh-3.1.5-pws-16 and zsh-3.1.5-pws-18 there was
> introduced probably a bug (?) regarding substitutions like
> 
>   ${*:-word}
> 
> that no longer works if $* name is empty or undefined.

multsub() didn't set `*isarr = 0' when returning a joined array.

Bye
 Sven

--- os/subst.c	Fri May 14 09:08:03 1999
+++ Src/subst.c	Mon May 17 10:57:42 1999
@@ -285,6 +285,8 @@
 	}
 	*s = sepjoin(r, NULL);
 	mult_isarr = omi;
+	if (isarr)
+	    *isarr = 0;
 	return 0;
     }
     if (l)

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author