]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/string_view.h
StringView::rfind(): Call rfind() instead of find() on subst
[apt.git] / apt-pkg / contrib / string_view.h
index b4ce0431ccb28dcb63e64c4ed343e406d2261db9..16f3245977f4d166262eab2591a50b0612ca3b4a 100644 (file)
@@ -57,7 +57,7 @@ public:
 
     size_t rfind(int c, size_t pos=0) const {
         if (pos != 0)
-            return substr(pos).find(c);
+            return substr(pos).rfind(c);
 
         const char *found = static_cast<const char*>(memrchr(data_, c, size_));