diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/test/util_tests.cpp | 1 | ||||
-rw-r--r-- | src/utilstrencodings.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp index 10f77e3a5b..feea140351 100644 --- a/src/test/util_tests.cpp +++ b/src/test/util_tests.cpp @@ -340,6 +340,7 @@ BOOST_AUTO_TEST_CASE(test_FormatParagraph) BOOST_CHECK_EQUAL(FormatParagraph("test test", 4, 0), "test\ntest"); BOOST_CHECK_EQUAL(FormatParagraph("testerde test ", 4, 0), "testerde\ntest"); BOOST_CHECK_EQUAL(FormatParagraph("test test", 4, 4), "test\n test"); + BOOST_CHECK_EQUAL(FormatParagraph("This is a very long test string. This is a second sentence in the very long test string."), "This is a very long test string. This is a second sentence in the very long\ntest string."); } BOOST_AUTO_TEST_CASE(test_FormatSubVersion) diff --git a/src/utilstrencodings.cpp b/src/utilstrencodings.cpp index d0062d4544..419a63c431 100644 --- a/src/utilstrencodings.cpp +++ b/src/utilstrencodings.cpp @@ -459,7 +459,7 @@ std::string FormatParagraph(const std::string in, size_t width, size_t indent) } // Append word out << in.substr(ptr, endword - ptr); - col += endword - ptr; + col += endword - ptr + 1; ptr = endword; } return out.str(); |