aboutsummaryrefslogtreecommitdiff
path: root/src/stable/stream.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2015-08-24 01:33:55 +0000
committerMike Buland <eichlan@xagasoft.com>2015-08-24 01:33:55 +0000
commit8c618fdda44e8ed4377476b58ec10fd2f73869ec (patch)
tree299d9fccebbcf686400b928f2e60cb6f0d30ae37 /src/stable/stream.cpp
parent61165ba36ee0cbada8a97d075bdaaf13cb5c5a4a (diff)
downloadlibbu++-8c618fdda44e8ed4377476b58ec10fd2f73869ec.tar.gz
libbu++-8c618fdda44e8ed4377476b58ec10fd2f73869ec.tar.bz2
libbu++-8c618fdda44e8ed4377476b58ec10fd2f73869ec.tar.xz
libbu++-8c618fdda44e8ed4377476b58ec10fd2f73869ec.zip
Minor stability/speed improvements, don't try to write null strings to a stream.
Diffstat (limited to 'src/stable/stream.cpp')
-rw-r--r--src/stable/stream.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/stable/stream.cpp b/src/stable/stream.cpp
index 2ae03d4..1b3555d 100644
--- a/src/stable/stream.cpp
+++ b/src/stable/stream.cpp
@@ -48,6 +48,8 @@ Bu::String Bu::Stream::readAll()
48 48
49Bu::size Bu::Stream::write( const Bu::String &sBuf ) 49Bu::size Bu::Stream::write( const Bu::String &sBuf )
50{ 50{
51 return write( sBuf.getStr(), sBuf.getSize() ); 51 if( sBuf.getSize() > 0 )
52 return write( sBuf.getStr(), sBuf.getSize() );
53 return 0;
52} 54}
53 55