From: Jacob Lifshay Date: Fri, 1 Sep 2017 08:17:31 +0000 (-0700) Subject: fix backwards comparison in basic_string_view::find X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e0555b4a71eb1d66f17bf87865633fd55d3fc021;p=kazan.git fix backwards comparison in basic_string_view::find --- diff --git a/src/util/string_view.h b/src/util/string_view.h index 7254618..1b278d3 100644 --- a/src/util/string_view.h +++ b/src/util/string_view.h @@ -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++)