summaryrefslogtreecommitdiff
path: root/tools/source/stream/stream.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'tools/source/stream/stream.cxx')
-rw-r--r--tools/source/stream/stream.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index a793446ce738..713d36504b6f 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -1561,6 +1561,10 @@ bool SvStream::SetStreamSize(sal_uInt64 const nSize)
sal_uInt16 nBuf = m_nBufSize;
SetBufferSize( 0 );
SetSize( nSize );
+ if (nSize < m_nBufFilePos)
+ {
+ m_nBufFilePos = nSize;
+ }
SetBufferSize( nBuf );
#ifdef DBG_UTIL
DBG_ASSERT(Tell()==nFPos,"SetStreamSize failed");