From a5f9701ce6d2df66de774f6257450c0f94a3b3c0 Mon Sep 17 00:00:00 2001 From: Noel Berry Date: Tue, 4 Oct 2022 18:23:51 -0700 Subject: [PATCH] fix to String::contains --- src/blah_string.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blah_string.cpp b/src/blah_string.cpp index 318f98c..60ca76d 100644 --- a/src/blah_string.cpp +++ b/src/blah_string.cpp @@ -191,7 +191,7 @@ bool BaseString::contains(const char* cstr, bool ignore_case) const return false; const char* ptr = s_ptr(); - const char* end = s_ptr() + length() - len; + const char* end = s_ptr() + length() - len + 1; auto compare = (ignore_case ? &blah_compare_ignore_case : &blah_compare_with_case); while (ptr < end)