From 4acfa61f587fd0c7e9f673955ed8e51fff4406ad Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 19 Nov 2021 22:47:03 +0100 Subject: [PATCH] Same change for the other get_slice_count. --- core/string.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/string.cpp b/core/string.cpp index e44d9e6..9ef94e9 100644 --- a/core/string.cpp +++ b/core/string.cpp @@ -358,7 +358,7 @@ void String::trim_end() { } int String::get_slice_count(const char splitter) const { - int count = 0; + int count = 1; for (int i = 0; i < _size; ++i) { if (_data[i] == splitter) {