Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: small parameter fix
- X-seq: zsh-workers 5671
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: small parameter fix
- Date: Mon, 8 Mar 1999 09:50:42 +0100 (MET)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
...although I'm not sure if it was not intentional. If it was, I'd
like to hear the reason. This:
${${...}[...]}
previously didn't really work: if the inner ${...} produced an array
with only one element, the outer ${...} treated it as a string and the
subscript gave the n'th character.
Bye
Sven
--- os/subst.c Fri Mar 5 20:10:39 1999
+++ Src/subst.c Sat Mar 6 13:28:41 1999
@@ -263,7 +263,7 @@
*isarr = 0;
return 0;
}
- if ((l = countlinknodes(foo)) > 1) {
+ if ((l = countlinknodes(foo)) > 1 || a) {
p = r = ncalloc((l + 1) * sizeof(char*));
while (nonempty(foo))
*p++ = (char *)ugetnode(foo);
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author