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

New hist.c patch (Was: Re: UGLY CRASHES UNDER ZSH 2.6 BETA 12)



Hello,

On Fri, 01 Mar 1996 14:36:42 +0100, Peter Stephenson wrote:
[original bug report omitted]
> I can't reproduce this either for some reason, but my guess is that
> the alias stack has got a NULL on it, which signifies history
> expansion, and the lexrestore() is assuming it's an alias and trying
> to dereference it.  Have a go at this (should be completely safe to
> give to the kids at home):


Thanks!  It worked.  Here's Peter's patch again:


==============================================================================
*** Src/hist.c~	Mon Feb 19 10:09:38 1996
--- Src/hist.c	Fri Mar  1 14:31:05 1996
***************
*** 440,447 ****
      Alias ix;
  
      while (alstackind) {
! 	ix = alstack[--alstackind];
! 	ix->inuse = 0;
      }
  }
  
--- 440,447 ----
      Alias ix;
  
      while (alstackind) {
! 	if ((ix = alstack[--alstackind]))
! 	  ix->inuse = 0;
      }
  }
==============================================================================

Later,

- Eskandar

------------------------------------------------------------------------------
Eskandar Ensafi                              Object-Oriented Software Engineer
University of California, Los Angeles                                         
Department of Biomathematics              esky@xxxxxxxxxxx (ASCII, MIME, NeXT)
School of Medicine                  http://www.cs.ucla.edu/csd-lanai/fweb/esky
------------------------------------------------------------------------------



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