소스 검색

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

Thanks: Niels Thykier for reporting on IRC
Gbp-Dch: ignore
Julian Andres Klode 10 년 전
부모
커밋
8cfd5495e3
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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 {
     size_t rfind(int c, size_t pos=0) const {
         if (pos != 0)
         if (pos != 0)
-            return substr(pos).find(c);
+            return substr(pos).rfind(c);
 
 
         const char *found = static_cast<const char*>(memrchr(data_, c, size_));
         const char *found = static_cast<const char*>(memrchr(data_, c, size_));