This is the mail archive of the java-patches@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: InflaterInputStream fix and misc tweaks


Mark Wielaard wrote:

> On Wed, Nov 29, 2000 at 11:09:21PM +1300, Bryce McKinlay wrote:
> > +     count = inf.inflate(buf, off, len);
> > +     if (count == 0)
> > +       {
> > +         if (len == -1)
> > +           return -1; // Couldn't get any more data to feed to the Inflater
> > +         if (inf.needsDictionary())
> > +           throw new ZipException ("Inflater needs Dictionary");
> > +       }
>
> You want to check this.len which gives the last result of in.read() in fill()
> not the local len which is a local parameter of the method.

Yeah, thanks. I actually noticed the name conflict when I was looking for the bug
and still made the mistake when I fixed it... oops ;-)

I'm checking in the obvious fix.

regards

  [ bryce ]



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]