]> git.saurik.com Git - apt.git/commitdiff
Fix the PkgFileIterator Constructor which defaults to the wrong value.
authorDavid Kalnischkies <kalnischkies@gmail.com>
Sun, 28 Feb 2010 18:45:05 +0000 (19:45 +0100)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Sun, 28 Feb 2010 18:45:05 +0000 (19:45 +0100)
(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)

apt-pkg/cacheiterators.h

index a64326a44b82e6bc6e194826f60be69e97f3324b..28e062f3c502038a814d9475f58b9cf1c122b076 100644 (file)
@@ -345,7 +345,8 @@ class pkgCache::PkgFileIterator : public Iterator<PackageFile, PkgFileIterator>
 
        // Constructors
        inline PkgFileIterator() : Iterator<PackageFile, PkgFileIterator>() {};
-       inline PkgFileIterator(pkgCache &Owner,PackageFile *Trg = 0) : Iterator<PackageFile, PkgFileIterator>(Owner, Trg) {};
+       inline PkgFileIterator(pkgCache &Owner) : Iterator<PackageFile, PkgFileIterator>(Owner, Owner.PkgFileP) {};
+       inline PkgFileIterator(pkgCache &Owner,PackageFile *Trg) : Iterator<PackageFile, PkgFileIterator>(Owner, Trg) {};
 };
                                                                        /*}}}*/
 // Version File                                                                /*{{{*/