fdo#79941: Properly handle short reads

Change-Id: Ie762ff272410d809382f98a1d446946b566df747
This commit is contained in:
Stephan Bergmann
2014-11-21 18:31:31 +01:00
parent 17e51f427b
commit 7a0bfcbce1

View File

@@ -294,7 +294,7 @@ sal_Int32 OTextInputStream::implReadNext()
sal_Int32 nBytesToRead = READ_BYTE_COUNT;
sal_Int32 nRead = mxStream->readSomeBytes( mSeqSource, nBytesToRead );
sal_Int32 nTotalRead = nRead;
if( nRead < nBytesToRead )
if( nRead == 0 )
mbReachedEOF = true;
// Try to convert