summaryrefslogtreecommitdiff
path: root/apt-pkg/tagfile.cc
diff options
context:
space:
mode:
authorMichael Vogt <egon@bottom>2006-06-26 16:06:38 +0200
committerMichael Vogt <egon@bottom>2006-06-26 16:06:38 +0200
commitf983dc86621eb7b0554efc4b35091179c3fdb72d (patch)
tree7b3c0274eacdc0fb14fd9cd4ac9f93ca498986f1 /apt-pkg/tagfile.cc
parentdfa8d6b21806c76df2e53555c577e8d2029186c4 (diff)
parent6b6afec3673bd1685e62a5c4b1803531a44add82 (diff)
* merged the auto-remove branch
Diffstat (limited to 'apt-pkg/tagfile.cc')
-rw-r--r--apt-pkg/tagfile.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc
index fc020436c..25e2930fa 100644
--- a/apt-pkg/tagfile.cc
+++ b/apt-pkg/tagfile.cc
@@ -98,7 +98,8 @@ bool pkgTagFile::Jump(pkgTagSection &Tag,unsigned long Offset)
iOffset = Offset;
Start = Buffer + iOffset;
- if (Tag.Scan(Start,End - Start) == false)
+ // Start != End is a special case to not fail on empty TagFiles
+ if (Start != End && Tag.Scan(Start,End - Start) == false)
return _error->Error(_("Unable to parse package file %s (2)"),Fd.Name().c_str());
return true;