summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r--apt-pkg/contrib/string_view.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/contrib/string_view.h b/apt-pkg/contrib/string_view.h
index 3585da45a..37a30a6df 100644
--- a/apt-pkg/contrib/string_view.h
+++ b/apt-pkg/contrib/string_view.h
@@ -57,7 +57,7 @@ public:
size_t rfind(int c, size_t pos=npos) const {
if (pos != npos)
- return substr(pos).rfind(c);
+ return substr(0, pos).rfind(c);
const char *found = static_cast<const char*>(memrchr(data_, c, size_));