From: David Kalnischkies Date: Sun, 28 Feb 2010 18:45:05 +0000 (+0100) Subject: Fix the PkgFileIterator Constructor which defaults to the wrong value. X-Git-Tag: 0.8.0~9^2~64^2~20^2~7 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/a04cd1f9a580867d65be8f1ecb3eac25a86eb953 Fix the PkgFileIterator Constructor which defaults to the wrong value. (0 instead of the HeaderP) This breaks the Cache Validation functionality as the end() doesn't test for NULL. (The fault was introduced with the rewriting of the CacheIterators) --- diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h index a64326a44..28e062f3c 100644 --- a/apt-pkg/cacheiterators.h +++ b/apt-pkg/cacheiterators.h @@ -345,7 +345,8 @@ class pkgCache::PkgFileIterator : public Iterator // Constructors inline PkgFileIterator() : Iterator() {}; - inline PkgFileIterator(pkgCache &Owner,PackageFile *Trg = 0) : Iterator(Owner, Trg) {}; + inline PkgFileIterator(pkgCache &Owner) : Iterator(Owner, Owner.PkgFileP) {}; + inline PkgFileIterator(pkgCache &Owner,PackageFile *Trg) : Iterator(Owner, Trg) {}; }; /*}}}*/ // Version File /*{{{*/