summaryrefslogtreecommitdiff
path: root/src/myriadstream.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/myriadstream.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/myriadstream.cpp b/src/myriadstream.cpp
index 41c5b53..b0b1d05 100644
--- a/src/myriadstream.cpp
+++ b/src/myriadstream.cpp
@@ -139,9 +139,7 @@ size_t Bu::MyriadStream::write( const void *pBuf, size_t nBytes )
139 } 139 }
140 else 140 else
141 { 141 {
142 iCurBlock = rMyriad.findEmptyBlock(); 142 iCurBlock = rMyriad.streamAddBlock( pStream );
143 pStream->aBlocks.append( iCurBlock );
144 rMyriad.bsBlockUsed.setBit( iCurBlock );
145#ifdef MYRIAD_STREAM_DEBUG 143#ifdef MYRIAD_STREAM_DEBUG
146 sio << "MyriadStream: write: " << __LINE__ << ": New block allocated and appended: " 144 sio << "MyriadStream: write: " << __LINE__ << ": New block allocated and appended: "
147 << iCurBlock << "." << sio.nl; 145 << iCurBlock << "." << sio.nl;
@@ -283,6 +281,8 @@ void Bu::MyriadStream::setBlocking( bool /*bBlocking*/ )
283 281
284void Bu::MyriadStream::setSize( long iSize ) 282void Bu::MyriadStream::setSize( long iSize )
285{ 283{
284 if( iSize < 0 )
285 iSize = 0;
286 rMyriad.setStreamSize( pStream, iSize ); 286 rMyriad.setStreamSize( pStream, iSize );
287 if( iPos > iSize ) 287 if( iPos > iSize )
288 iPos = iSize; 288 iPos = iSize;