diff options
-rw-r--r-- | sc/source/filter/excel/xistream.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx index a17170fdff26..8e48027cdf1b 100644 --- a/sc/source/filter/excel/xistream.cxx +++ b/sc/source/filter/excel/xistream.cxx @@ -835,8 +835,6 @@ OUString XclImpStream::ReadRawUniString( sal_uInt16 nChars, bool b16Bit ) sal_uInt16 nCharsLeft = nChars; sal_uInt16 nReadSize; - std::unique_ptr<sal_Unicode[]> pcBuffer(new sal_Unicode[ nCharsLeft + 1 ]); - while( IsValid() && (nCharsLeft > 0) ) { if( b16Bit ) @@ -848,6 +846,8 @@ OUString XclImpStream::ReadRawUniString( sal_uInt16 nChars, bool b16Bit ) else nReadSize = GetMaxRawReadSize( nCharsLeft ); + std::unique_ptr<sal_Unicode[]> pcBuffer(new sal_Unicode[nReadSize + 1]); + sal_Unicode* pcUniChar = pcBuffer.get(); sal_Unicode* pcEndChar = pcBuffer.get() + nReadSize; |