about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--kgramstats.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kgramstats.cpp b/kgramstats.cpp index cb63db6..426603f 100644 --- a/kgramstats.cpp +++ b/kgramstats.cpp
@@ -746,7 +746,7 @@ std::string rawr::randomSentence(int maxL)
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 }