From 9f1f17ccd4f84c23410ae62911c85f5836c3b503 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 5 Jun 2010 13:09:18 +0200 Subject: Don't increase the commandline parameter in the library but in the application to be really generic. --- apt-pkg/cacheset.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/cacheset.cc b/apt-pkg/cacheset.cc index 7372c909e..5dbd1a4df 100644 --- a/apt-pkg/cacheset.cc +++ b/apt-pkg/cacheset.cc @@ -79,7 +79,7 @@ PackageSet PackageSet::FromRegEx(pkgCacheFile &Cache, std::string pattern, std:: // FromCommandLine - Return all packages specified on commandline /*{{{*/ PackageSet PackageSet::FromCommandLine(pkgCacheFile &Cache, const char **cmdline, std::ostream &out) { PackageSet pkgset; - for (const char **I = cmdline + 1; *I != 0; I++) { + for (const char **I = cmdline; *I != 0; ++I) { PackageSet pset = FromString(Cache, *I, out); pkgset.insert(pset.begin(), pset.end()); } @@ -105,7 +105,7 @@ PackageSet PackageSet::FromString(pkgCacheFile &Cache, const char * const str, s APT::VersionSet VersionSet::FromCommandLine(pkgCacheFile &Cache, const char **cmdline, APT::VersionSet::Version const &fallback, std::ostream &out) { VersionSet verset; - for (const char **I = cmdline + 1; *I != 0; I++) { + for (const char **I = cmdline; *I != 0; ++I) { std::string pkg = *I; std::string ver; bool verIsRel = false; -- cgit v1.2.3