Przeglądaj źródła

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

Thanks: Niels Thykier for reporting on IRC
Gbp-Dch: ignore
Julian Andres Klode 10 lat temu
rodzic
commit
8cfd5495e3
1 zmienionych plików z 1 dodań i 1 usunięć
  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_));