From a24a1aab57af0b7dd883df486194abef0d3c62c3 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 10 May 2012 04:23:52 +0000 Subject: Amazing this made it through for so long, but destroying a Bu::Buffer in write mode didn't flush it's buffers. --- src/stable/buffer.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/stable') 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 ) : Bu::Buffer::~Buffer() { + flush(); delete[] sReadBuf; delete[] sWriteBuf; } @@ -35,6 +36,7 @@ void Bu::Buffer::start() Bu::size Bu::Buffer::stop() { + flush(); iReadBufFill = iReadPos = iWriteBufFill = iWritePos = 0; return sSoFar; } -- cgit v1.2.3