diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-23 21:11:57 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-23 21:11:57 +0100 |
commit | 68441d448e377f9a61af5c29c793922fff0d9328 (patch) | |
tree | 6fc34379b4fc010751c4cd38ea0722f37f1cf085 /src | |
parent | d8b25fe2e585634567483124a33c3b779d2516f5 (diff) |
errors have a limited buffer, and discard any overflow data, replaced std::cout calls with Php::out calls in the documentation
Diffstat (limited to 'src')
-rw-r--r-- | src/streambuf.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/streambuf.cpp b/src/streambuf.cpp index d4b4680..e258b4e 100644 --- a/src/streambuf.cpp +++ b/src/streambuf.cpp @@ -34,6 +34,9 @@ StreamBuf::StreamBuf(int error) : _error(error) */ int StreamBuf::overflow(int c) { + // for error buffers, overflow is simply discarded + if (_error) return c; + // end-of-file has not output, we call EOF directly, and by using the // comma operator we ensure that EOF is returned if (c == EOF) return sync(), EOF; |