about summary refs log tree commit diff stats
path: root/kgramstats.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kgramstats.cpp')
-rw-r--r--kgramstats.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kgramstats.cpp b/kgramstats.cpp index f171be9..17c3c2d 100644 --- a/kgramstats.cpp +++ b/kgramstats.cpp
@@ -746,7 +746,7 @@ std::string rawr::randomSentence(int maxL) const
746 } 746 }
747 747
748 // Remove the trailing space 748 // Remove the trailing space
749 if (result.back() == ' ') 749 if (result.back() == ' ' || result.back() == '\n')
750 { 750 {
751 result.pop_back(); 751 result.pop_back();
752 } 752 }