From 60ff78bdcfeef7713a3669cfe37e81e29f33f6aa Mon Sep 17 00:00:00 2001 From: Petr Mladek Date: Fri, 7 Jan 2011 20:12:40 +0100 Subject: Micro optimization of the last commit nBufSize was set by aBuffer.getLength() and had not been used in the end --- package/source/zipapi/ZipFile.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'package') diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx index e83d824c3d87..005d29196fd6 100644 --- a/package/source/zipapi/ZipFile.cxx +++ b/package/source/zipapi/ZipFile.cxx @@ -853,7 +853,7 @@ sal_Int32 ZipFile::recover() // the buffer should contain at least one header, // or if it is end of the file, at least the postheader with sizes and hash while( nPos < nBufSize - 30 - || ( aBuffer.getLength() < nToRead && nPos < nBufSize - 16 ) ) + || ( nBufSize < nToRead && nPos < nBufSize - 16 ) ) { if ( nPos < nBufSize - 30 && pBuffer[nPos] == 'P' && pBuffer[nPos+1] == 'K' && pBuffer[nPos+2] == 3 && pBuffer[nPos+3] == 4 ) -- cgit