diff options
Diffstat (limited to 'apt-pkg/deb/deblistparser.cc')
-rw-r--r-- | apt-pkg/deb/deblistparser.cc | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 4e61f0fc2..378988a1c 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -12,26 +12,25 @@ // Include Files /*{{{*/ #include <config.h> -#include <apt-pkg/deblistparser.h> -#include <apt-pkg/error.h> -#include <apt-pkg/configuration.h> -#include <apt-pkg/cachefilter.h> #include <apt-pkg/aptconfiguration.h> -#include <apt-pkg/strutl.h> +#include <apt-pkg/cachefilter.h> +#include <apt-pkg/configuration.h> #include <apt-pkg/crc-16.h> +#include <apt-pkg/deblistparser.h> +#include <apt-pkg/error.h> +#include <apt-pkg/macros.h> #include <apt-pkg/md5.h> #include <apt-pkg/pkgcache.h> -#include <apt-pkg/cacheiterators.h> -#include <apt-pkg/tagfile.h> +#include <apt-pkg/strutl.h> #include <apt-pkg/tagfile-keys.h> -#include <apt-pkg/macros.h> +#include <apt-pkg/tagfile.h> -#include <stddef.h> -#include <string.h> #include <algorithm> #include <string> #include <vector> #include <ctype.h> +#include <stddef.h> +#include <string.h> /*}}}*/ using std::string; @@ -372,6 +371,11 @@ unsigned short debListParser::VersionHash() string to make that not matter. */ for (; Start != End; ++Start) { + // Strip away 0: epochs from input + if (*Start == '0' && Start[1] == ':') { + Start++; // Skip the : + continue; // Skip the 0 + } if (isspace_ascii(*Start) != 0 || *Start == '=') continue; Result = AddCRC16Byte(Result, tolower_ascii_unsafe(*Start)); |