Explorar o código

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)

David Kalnischkies %!s(int64=16) %!d(string=hai) anos
pai
achega
a04cd1f9a5
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      apt-pkg/cacheiterators.h

+ 2 - 1
apt-pkg/cacheiterators.h

@@ -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								/*{{{*/