From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: <5d375e920902041828p173f0f3etdd5fabd3a65bc330@mail.gmail.com> Date: Thu, 5 Feb 2009 15:41:45 +0100 Message-ID: <5d375e920902050641p78dc58f8uc97a98984a507b83@mail.gmail.com> From: Uriel To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [9fans] sed crash Topicbox-Message-UUID: 96f00fe6-ead4-11e9-9d60-3106f5b1d025 That was even faster than I expected. Thanks Russ! uriel P.S.: Silly question, why is du(1) not built by default in p9p? The code already there seems to work as far as I can tell.. On Thu, Feb 5, 2009 at 5:15 AM, Russ Cox wrote: > Sed is fixed in plan9port. > > $ hg diff sed.c > diff -r 478b53880a80 src/cmd/sed.c > --- a/src/cmd/sed.c Wed Feb 04 20:12:48 2009 -0800 > +++ b/src/cmd/sed.c Wed Feb 04 20:13:08 2009 -0800 > @@ -994,7 +994,7 @@ > return 0; > subexp[0].s.rsp = buf; > subexp[0].e.rep = 0; > - if (rregexec(pattern, linebuf, subexp, MAXSUB)) { > + if (rregexec(pattern, linebuf, subexp, MAXSUB) > 0) { > loc1 = subexp[0].s.rsp; > loc2 = subexp[0].e.rep; > return 1; > $ > > http://hg.pdos.csail.mit.edu/hg/plan9/rev/0bf86c524c9b > >