From 0e58689ae76e8155bc1f418323aa9e56c34187f6 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 7 Jan 2016 20:23:48 +0100 Subject: [PATCH] StringView: rfind: pos should be end of substr, not start Gbp-Dch: ignore --- apt-pkg/contrib/string_view.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(memrchr(data_, c, size_)); -- 2.45.2