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.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index d2ecb8b1f..d6dd169bb 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -263,7 +263,7 @@ pkgCache::PkgIterator pkgCache::FindPkg(const string &Name) {
}
pkgCache::PkgIterator pkgCache::FindPkg(StringView Name) {
- auto const found = Name.find(':');
+ auto const found = Name.rfind(':');
if (found == string::npos)
return FindPkg(Name, "native");
auto const Arch = Name.substr(found+1);