diff options
author | 2010-08-09 19:47:09 +0100 | |
---|---|---|
committer | 2010-08-09 19:47:09 +0100 | |
commit | 7fe2cc9af8e30a2ed2ad3cb5390609acfacd5e95 (patch) | |
tree | b0b6631ac0795e41576e6ea3f4e0d09e30e83675 | |
parent | 74e08deb85899e4fa5f03a60c82cf89b78ac38a9 (diff) | |
download | paludis-7fe2cc9af8e30a2ed2ad3cb5390609acfacd5e95.tar.gz paludis-7fe2cc9af8e30a2ed2ad3cb5390609acfacd5e95.tar.xz |
Flush buffers on cr as well as lf
-rw-r--r-- | paludis/util/buffer_output_stream.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/paludis/util/buffer_output_stream.cc b/paludis/util/buffer_output_stream.cc index 146c7d323..0026fb117 100644 --- a/paludis/util/buffer_output_stream.cc +++ b/paludis/util/buffer_output_stream.cc @@ -60,7 +60,7 @@ BufferOutputStreamBuf::overflow(int_type c) if (c != traits_type::eof()) { _imp->active_string.append(std::string(1, c)); - if (c == '\n') + if (c == '\n' || c == '\r') { _imp->complete_strings.push_back(_imp->active_string); _imp->active_string.clear(); @@ -76,7 +76,7 @@ BufferOutputStreamBuf::xsputn(const char * s, std::streamsize num) Lock lock(_imp->mutex); _imp->active_string.append(std::string(s, num)); - if (std::string::npos != _imp->active_string.find('\n', _imp->active_string.length() - num)) + if (std::string::npos != _imp->active_string.find_first_of("\r\n", _imp->active_string.length() - num)) { _imp->complete_strings.push_back(_imp->active_string); _imp->active_string.clear(); |