summaryrefslogtreecommitdiff
path: root/apt-pkg/tagfile.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:51:10 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:51:10 +0000
commitc88edf1d276eb4e01b92835163bdd8574ded93db (patch)
tree58a2a86710184e87288f16656294606a152ac02a /apt-pkg/tagfile.cc
parent24231681aa99e84c8a6aae5e54b7e207e19d6087 (diff)
Sync
Author: jgg Date: 1998-10-24 04:57:55 GMT Sync
Diffstat (limited to 'apt-pkg/tagfile.cc')
-rw-r--r--apt-pkg/tagfile.cc11
1 files changed, 8 insertions, 3 deletions
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;
}