summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/versionmatch.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/versionmatch.cc b/apt-pkg/versionmatch.cc
index 65908f733..a269338d6 100644
--- a/apt-pkg/versionmatch.cc
+++ b/apt-pkg/versionmatch.cc
@@ -183,7 +183,7 @@ bool pkgVersionMatch::ExpressionMatches(const char *pattern, const char *string)
char *regex = strdup(pattern + 1);
regex[length - 2] = '\0';
if (regcomp(&preg, regex, REG_EXTENDED | REG_ICASE) != 0) {
- std::cerr << "E: Invalid regular expression: " << regex << "\n";
+ _error->Warning("Invalid regular expression: %s", regex);
} else if (regexec(&preg, string, 0, NULL, 0) == 0) {
res = true;
}