]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/debindexfile.cc
add --with-source option and Packages/Sources support
[apt.git] / apt-pkg / deb / debindexfile.cc
index 6a23b2c00ae57b96881857110f6df6a756abee1f..65bd3e6eefd6320614b1ac133ba426bad40d31b7 100644 (file)
@@ -80,7 +80,11 @@ debPackagesIndex::debPackagesIndex(IndexTarget const &Target, bool const Trusted
 std::string debPackagesIndex::ArchiveInfo(pkgCache::VerIterator const &Ver) const
 {
    std::string Res = Target.Description;
-   Res.erase(Target.Description.rfind(' '));
+   {
+      auto const space = Target.Description.rfind(' ');
+      if (space != std::string::npos)
+        Res.erase(space);
+   }
 
    Res += " ";
    Res += Ver.ParentPkg().Name();