summaryrefslogtreecommitdiff
path: root/apt-pkg/tagfile.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/tagfile.cc')
-rw-r--r--apt-pkg/tagfile.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc
index dc1ba3f9e..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;
@@ -342,7 +343,8 @@ static const char *iTFRewritePackageOrder[] = {
"Filename",
"Size",
"MD5Sum",
- "SHA1Sum",
+ "SHA1",
+ "SHA256",
"MSDOS-Filename", // Obsolete
"Description",
0};