fix backwards comparison in basic_string_view::find
authorJacob Lifshay <programmerjake@gmail.com>
Fri, 1 Sep 2017 08:17:31 +0000 (01:17 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Fri, 1 Sep 2017 08:17:31 +0000 (01:17 -0700)
src/util/string_view.h

index 72546186297b5989ab6b578bf3f9dd1be30eccc4..1b278d31d16f2395875b0857021d1c166f25a0a9 100644 (file)
@@ -233,7 +233,7 @@ public:
     {
         if(pos > string_size)
             return npos;
-        for(; string_size - pos < v.string_size; pos++)
+        for(; string_size - pos >= v.string_size; pos++)
         {
             bool found = true;
             for(std::size_t i = 0; i < v.string_size; i++)