From df5ccc2472a86b85c5ac1a41d0b0fafca186423a Mon Sep 17 00:00:00 2001 From: Alayan Date: Sun, 14 Oct 2018 17:17:45 +0200 Subject: [PATCH] Fix missing last char in a line --- src/utils/string_utils.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/string_utils.cpp b/src/utils/string_utils.cpp index ef413aa10..d6220e17f 100644 --- a/src/utils/string_utils.cpp +++ b/src/utils/string_utils.cpp @@ -1002,7 +1002,8 @@ namespace StringUtils // Step 7 push_text: - std::wstring text_line = work_copy.substr(0,break_index); + // To include the char at break_index, we need a length of break_index+1 + std::wstring text_line = work_copy.substr(0,break_index+1); output.push_back(text_line); // If the line break was the last char of the input string