summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/filter/excel/xistream.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx
index f5f82e5176ff..e1126aaf2950 100644
--- a/sc/source/filter/excel/xistream.cxx
+++ b/sc/source/filter/excel/xistream.cxx
@@ -797,8 +797,10 @@ void XclImpStream::Ignore( std::size_t nBytes )
{
// implementation similar to Read(), but without really reading anything
std::size_t nBytesLeft = nBytes;
- while( mbValid && (nBytesLeft > 0) )
+ while (mbValid)
{
+ if (!nBytesLeft)
+ break;
sal_uInt16 nReadSize = GetMaxRawReadSize( nBytesLeft );
mbValid = checkSeek(mrStrm, mrStrm.Tell() + nReadSize);
mnRawRecLeft = mnRawRecLeft - nReadSize;