From b13afed724548cfa6f4f4125f1e764211abeae59 Mon Sep 17 00:00:00 2001 From: niansa Date: Sat, 29 Apr 2023 21:52:55 +0200 Subject: [PATCH] Fixed utils::max_words cutting off the string too early --- utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.cpp b/utils.cpp index 24882ea..039aa99 100644 --- a/utils.cpp +++ b/utils.cpp @@ -49,6 +49,6 @@ std::string_view max_words(std::string_view text, unsigned count) { } } // Return resulting string - return {text.data(), text.size()-idx}; + return {text.data(), idx}; } }