diff options
author | Julian Andres Klode <jak@debian.org> | 2016-01-07 20:23:48 +0100 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2016-01-07 20:23:48 +0100 |
commit | 0e58689ae76e8155bc1f418323aa9e56c34187f6 (patch) | |
tree | b667b011aa6d860dce88b6eca0e5e918a3e6a3c1 /apt-pkg/contrib | |
parent | eee8ee176a5ae3377cc601eb68cdb576b8076761 (diff) |
StringView: rfind: pos should be end of substr, not start
Gbp-Dch: ignore
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r-- | apt-pkg/contrib/string_view.h | 2 |
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_)); |