summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/string_view.h
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-01-07 20:23:48 +0100
committerJulian Andres Klode <jak@debian.org>2016-01-07 20:23:48 +0100
commit0e58689ae76e8155bc1f418323aa9e56c34187f6 (patch)
treeb667b011aa6d860dce88b6eca0e5e918a3e6a3c1 /apt-pkg/contrib/string_view.h
parenteee8ee176a5ae3377cc601eb68cdb576b8076761 (diff)
StringView: rfind: pos should be end of substr, not start
Gbp-Dch: ignore
Diffstat (limited to 'apt-pkg/contrib/string_view.h')
-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_));