summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r--apt-pkg/pkgcache.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 8b0e85ea3..3e01e771d 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcache.cc,v 1.19 1998/12/04 22:56:52 jgg Exp $
+// $Id: pkgcache.cc,v 1.20 1998/12/07 07:26:19 jgg Exp $
/* ######################################################################
Package Cache - Accessor code for the cache
@@ -159,7 +159,8 @@ pkgCache::PkgIterator pkgCache::FindPkg(string Name)
Package *Pkg = PkgP + HeaderP->HashTable[Hash(Name)];
for (; Pkg != PkgP; Pkg = PkgP + Pkg->NextPackage)
{
- if (Pkg->Name != 0 && StrP + Pkg->Name == Name)
+ if (Pkg->Name != 0 && StrP[Pkg->Name] == Name[0] &&
+ StrP + Pkg->Name == Name)
return PkgIterator(*this,Pkg);
}
return PkgIterator(*this,0);