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

unpleasant substitution bug



I can't believe this bug's still there.  The proper answer is probably
to upgrade to Zoltan's substitution code as soon as possible.  Until
then, it's bad enough to need fixing anyway.

% unset EMACS
% print ${EMACS:-}
}

uurgh.

*** Src/subst.c~	Tue Nov  7 04:43:21 1995
--- Src/subst.c	Tue Nov  7 15:47:00 1995
***************
*** 903,913 ****
  	if (!(flags & 0xf8))
  	    flags |= 16;
  
! 	for (bct = 1; bct && *++s;) {
  	    if (*s == '{' || *s == Inbrace)
  		bct++;
  	    else if (*s == '}' || *s == Outbrace)
! 		bct--;
  	}
  
  	if (*s)
--- 903,914 ----
  	if (!(flags & 0xf8))
  	    flags |= 16;
  
! 	for (bct = 1; *s; s++) {
  	    if (*s == '{' || *s == Inbrace)
  		bct++;
  	    else if (*s == '}' || *s == Outbrace)
! 		if (!--bct)
! 		    break;
  	}
  
  	if (*s)

-- 
Peter Stephenson <pws@xxxxxx>       Tel: +49 33762 77366
WWW:  http://www.ifh.de/~pws/       Fax: +49 33762 77330
Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.



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