summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/streaming/memorystream.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/comphelper/source/streaming/memorystream.cxx b/comphelper/source/streaming/memorystream.cxx
index a4e713777a90..4477cd068188 100644
--- a/comphelper/source/streaming/memorystream.cxx
+++ b/comphelper/source/streaming/memorystream.cxx
@@ -197,7 +197,7 @@ void SAL_CALL UNOMemoryStream::writeBytes( const Sequence< sal_Int8 >& aData )
}
if( static_cast< sal_Int32 >( nNewSize ) > static_cast< sal_Int32 >( maData.size() ) )
- maData.resize( static_cast< sal_Int32 >( nNewSize ) );
+ maData.insert( maData.end(), nNewSize - maData.size(), 0 );
sal_Int8* pData = &(*maData.begin());
sal_Int8* pCursor = &(pData[mnCursor]);
@@ -219,7 +219,7 @@ void SAL_CALL UNOMemoryStream::closeOutput()
//XTruncate
void SAL_CALL UNOMemoryStream::truncate()
{
- maData.resize( 0 );
+ maData.clear();
mnCursor = 0;
}