X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/5465192b9aeb1ccea778950ccf2d1b7b32f2cd91..3a8776a37af38127fb04565959e8e0e449eb04a4:/apt-pkg/sourcelist.cc diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc index 46e51f592..d3bcbce5f 100644 --- a/apt-pkg/sourcelist.cc +++ b/apt-pkg/sourcelist.cc @@ -275,8 +275,8 @@ pkgSourceList::~pkgSourceList() for (const_iterator I = SrcList.begin(); I != SrcList.end(); ++I) delete *I; SrcList.clear(); - for (pkgIndexFile * const File : VolatileFiles) - delete File; + for (auto F = VolatileFiles.begin(); F != VolatileFiles.end(); ++F) + delete (*F); VolatileFiles.clear(); } /*}}}*/ @@ -384,7 +384,7 @@ bool pkgSourceList::ParseFileOldStyle(std::string const &File) continue; // Grok it - std::string const LineType = Buffer.substr(0, Buffer.find(' ')); + std::string const LineType = Buffer.substr(0, Buffer.find_first_of(" \t\v")); if (LineType.empty() || LineType == Buffer) return _error->Error(_("Malformed line %u in source list %s (type)"),CurLine,File.c_str());