From c88edf1d276eb4e01b92835163bdd8574ded93db Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:51:10 +0000 Subject: Sync Author: jgg Date: 1998-10-24 04:57:55 GMT Sync --- apt-pkg/tagfile.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'apt-pkg/tagfile.cc') diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc index 50d669977..23fc344f3 100644 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: tagfile.cc,v 1.11 1998/10/02 04:39:48 jgg Exp $ +// $Id: tagfile.cc,v 1.12 1998/10/24 04:58:06 jgg Exp $ /* ###################################################################### Fast scanner for RFC-822 type header information @@ -75,18 +75,23 @@ bool pkgTagFile::Fill() Start = Buffer; End = Buffer + EndSize; - // See if only a bit of the file is left - if (Left < Size) + // See if only a bit of the file is left + if (Left < Size - (End - Buffer)) { if (Fd.Read(End,Left) == false) return false; + End += Left; Left = 0; } else { if (Fd.Read(End,Size - (End - Buffer)) == false) + { + cout << "boink" << endl; return false; + } + Left -= Size - (End - Buffer); End = Buffer + Size; } -- cgit v1.2.3