aboutsummaryrefslogtreecommitdiff
path: root/justify.cc
diff options
context:
space:
mode:
Diffstat (limited to 'justify.cc')
-rw-r--r--justify.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/justify.cc b/justify.cc
index 8120ded..c417dfd 100644
--- a/justify.cc
+++ b/justify.cc
@@ -81,8 +81,12 @@ bool process(const boost::program_options::variables_map& variables) {
justify::LineAccumulator acc{line_length, line_offset};
std::string token;
- while ( std::cin >> token ) {
- acc(token);
+ while ( std::cin.good() ) {
+ if ( std::cin >> token ) {
+ acc(token);
+ } else {
+ return true;
+ }
}
return true;