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

PATCH: small parameter fix



...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