From e0555b4a71eb1d66f17bf87865633fd55d3fc021 Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Fri, 1 Sep 2017 01:17:31 -0700 Subject: [PATCH] fix backwards comparison in basic_string_view::find --- src/util/string_view.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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++) -- 2.30.2