diff options
Diffstat (limited to 'apt-pkg/tagfile.cc')
-rw-r--r-- | apt-pkg/tagfile.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc index 8f323bb..95ae4a4 100644 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@ -431,6 +431,11 @@ bool pkgTagFile::Fill() that is there */ bool pkgTagFile::Jump(pkgTagSection &Tag,unsigned long long Offset) { + // Head back to the start of the buffer, in case we get called for the same section + // again (d->Start will point to next section already) + d->iOffset -= d->Start - d->Buffer; + d->Start = d->Buffer; + if ((d->Flags & pkgTagFile::SUPPORT_COMMENTS) == 0 && // We are within a buffer space of the next hit.. Offset >= d->iOffset && d->iOffset + (d->End - d->Start) > Offset) |