Subject: Re: bug in sed
To: None <current-users>
From: Charles Hannum <mycroft>
List: current-users
Date: 03/24/1994 07:56:14
I just fixed this.  Try the following diff:

===================================================================
RCS file: /b/source/CVS/src/usr.bin/sed/process.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -c -2 -r1.12 -r1.13
*** 1.12	1994/03/01 06:32:54
--- 1.13	1994/03/24 15:55:01
***************
*** 38,42 ****
  #ifndef lint
  /* from: static char sccsid[] = "@(#)process.c	8.1 (Berkeley) 6/6/93"; */
! static char *rcsid = "$Id: process.c,v 1.12 1994/03/01 06:32:54 cgd Exp $";
  #endif /* not lint */
  
--- 38,42 ----
  #ifndef lint
  /* from: static char sccsid[] = "@(#)process.c	8.1 (Berkeley) 6/6/93"; */
! static char *rcsid = "$Id: process.c,v 1.13 1994/03/24 15:55:01 mycroft Exp $";
  #endif /* not lint */
  
***************
*** 136,140 ****
  					pd = 1;
  				else {
! 					psl -= (p - ps) - 1;
  					memmove(ps, p + 1, psl);
  				}
--- 136,140 ----
  					pd = 1;
  				else {
! 					psl -= (p + 1) - ps;
  					memmove(ps, p + 1, psl);
  				}

------------------------------------------------------------------------------