Explorar o código

StringView::rfind(): Call rfind() instead of find() on subst

Thanks: Niels Thykier for reporting on IRC
Gbp-Dch: ignore
Julian Andres Klode %!s(int64=10) %!d(string=hai) anos
pai
achega
8cfd5495e3
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      apt-pkg/contrib/string_view.h

+ 1 - 1
apt-pkg/contrib/string_view.h

@@ -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_));