From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18837 invoked from network); 30 Oct 2001 17:37:16 -0000 Received: from ns2.primenet.com.au (HELO primenet.com.au) (?gUCCJUhgjr3uOzN1g6erLNqXpG9wni9/?@203.24.36.3) by ns1.primenet.com.au with SMTP; 30 Oct 2001 17:37:16 -0000 Received: (qmail 2133 invoked from network); 30 Oct 2001 17:37:14 -0000 Received: from sunsite.dk (130.225.247.90) by proxy.melb.primenet.com.au with SMTP; 30 Oct 2001 17:37:14 -0000 Received: (qmail 11879 invoked by alias); 30 Oct 2001 17:37:06 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16194 Received: (qmail 11866 invoked from network); 30 Oct 2001 17:37:04 -0000 From: Bart Schaefer Message-Id: <1011030173655.ZM30372@candle.brasslantern.com> Date: Tue, 30 Oct 2001 17:36:55 +0000 In-Reply-To: Comments: In reply to Wayne Davison "Re: .zsh_history bugreport" (Oct 26, 4:29pm) References: X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: Re: .zsh_history bugreport MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Oct 26, 4:29pm, Wayne Davison wrote: } Subject: Re: .zsh_history bugreport } } On Fri, 26 Oct 2001, Bart Schaefer wrote: } > So if fgets() returns nonzero but buf didn't get any longer, start == } > l and (start >= l) is true and so we return -1. } } The problem occurs when the buf DOES get longer, even just 1 character } longer. In this case, the '\0' byte was not at the start of the line, OK, I concur (though I'm surprised that every one of the assorted binary files I tried feeding to my version had at least one "\n\0" in it). 16184 probably should go onto the patches branch, too. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net