X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/a0e07f3ec885c12c733c12805391646c202f3f31..47d7761243a02368bb60b7227bd05a19ca4660d1:/apt-pkg/versionmatch.cc?ds=sidebyside diff --git a/apt-pkg/versionmatch.cc b/apt-pkg/versionmatch.cc index f336b3c35..26262a010 100644 --- a/apt-pkg/versionmatch.cc +++ b/apt-pkg/versionmatch.cc @@ -24,6 +24,8 @@ #include /*}}}*/ +using std::string; + // VersionMatch::pkgVersionMatch - Constructor /*{{{*/ // --------------------------------------------------------------------- /* Break up the data string according to the selected type */ @@ -179,9 +181,9 @@ pkgCache::VerIterator pkgVersionMatch::Find(pkgCache::PkgIterator Pkg) bool pkgVersionMatch::ExpressionMatches(const char *pattern, const char *string) { if (pattern[0] == '/') { - bool res = false; size_t length = strlen(pattern); if (pattern[length - 1] == '/') { + bool res = false; regex_t preg; char *regex = strdup(pattern + 1); regex[length - 2] = '\0';