aboutsummaryrefslogtreecommitdiff
path: root/src/stable
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-05-10 04:23:52 +0000
committerMike Buland <eichlan@xagasoft.com>2012-05-10 04:23:52 +0000
commita24a1aab57af0b7dd883df486194abef0d3c62c3 (patch)
treef172abf96fb77844adbcc2894ecb340c41cf19bc /src/stable
parent914ff487ab9c252696f0faaa54829afcbd8ea111 (diff)
downloadlibbu++-a24a1aab57af0b7dd883df486194abef0d3c62c3.tar.gz
libbu++-a24a1aab57af0b7dd883df486194abef0d3c62c3.tar.bz2
libbu++-a24a1aab57af0b7dd883df486194abef0d3c62c3.tar.xz
libbu++-a24a1aab57af0b7dd883df486194abef0d3c62c3.zip
Amazing this made it through for so long, but destroying a Bu::Buffer in write
mode didn't flush it's buffers.
Diffstat (limited to 'src/stable')
-rw-r--r--src/stable/buffer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/stable/buffer.cpp b/src/stable/buffer.cpp
index 26025ba..16c3e2f 100644
--- a/src/stable/buffer.cpp
+++ b/src/stable/buffer.cpp
@@ -25,6 +25,7 @@ Bu::Buffer::Buffer( Bu::Stream &rNext, int iWhat, int iBufSize ) :
25 25
26Bu::Buffer::~Buffer() 26Bu::Buffer::~Buffer()
27{ 27{
28 flush();
28 delete[] sReadBuf; 29 delete[] sReadBuf;
29 delete[] sWriteBuf; 30 delete[] sWriteBuf;
30} 31}
@@ -35,6 +36,7 @@ void Bu::Buffer::start()
35 36
36Bu::size Bu::Buffer::stop() 37Bu::size Bu::Buffer::stop()
37{ 38{
39 flush();
38 iReadBufFill = iReadPos = iWriteBufFill = iWritePos = 0; 40 iReadBufFill = iReadPos = iWriteBufFill = iWritePos = 0;
39 return sSoFar; 41 return sSoFar;
40} 42}