summaryrefslogtreecommitdiff
path: root/package/source/zipapi/Inflater.cxx
diff options
context:
space:
mode:
authorMartin Gallwey <mtg@openoffice.org>2000-11-16 21:50:51 +0000
committerMartin Gallwey <mtg@openoffice.org>2000-11-16 21:50:51 +0000
commitf987a8b5e957b2bc013effef594c26938a142923 (patch)
tree3954b96c4e8bc703d454e28ad6103b2d8f1abe6c /package/source/zipapi/Inflater.cxx
parent05ac3fe285dd77e0fc636af6ea5f6fea568a9d1d (diff)
Fixed some problems with the buffering
Diffstat (limited to 'package/source/zipapi/Inflater.cxx')
-rw-r--r--package/source/zipapi/Inflater.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/package/source/zipapi/Inflater.cxx b/package/source/zipapi/Inflater.cxx
index f7f9501ad6ac..a5b3b2e4fe25 100644
--- a/package/source/zipapi/Inflater.cxx
+++ b/package/source/zipapi/Inflater.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Inflater.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: mtg $ $Date: 2000-11-13 13:38:01 $
+ * last change: $Author: mtg $ $Date: 2000-11-16 22:50:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -71,7 +71,7 @@ void Inflater::init (sal_Bool bNowrap)
pStream = new z_stream;
/* memset to 0 to set zalloc/opaque etc */
memset (pStream, 0, sizeof(*pStream));
- sal_Int16 nRes;
+ sal_Int32 nRes;
nRes = inflateInit2(pStream, bNowrap ? -MAX_WBITS : MAX_WBITS);
switch (nRes)
{
@@ -235,9 +235,9 @@ void SAL_CALL Inflater::end( )
pStream = NULL;
}
-sal_Int16 Inflater::doInflateBytes (com::sun::star::uno::Sequence < sal_Int8 > &rBuffer, sal_Int16 nNewOffset, sal_Int16 nNewLength)
+sal_Int32 Inflater::doInflateBytes (com::sun::star::uno::Sequence < sal_Int8 > &rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength)
{
- sal_Int16 nResult;
+ sal_Int32 nResult;
pStream->next_in = (unsigned char*) sInBuffer.getConstArray()+ nOffset;
pStream->avail_in = nLength;
pStream->next_out = (unsigned char*) rBuffer.getArray() + nNewOffset;
@@ -252,7 +252,7 @@ sal_Int16 Inflater::doInflateBytes (com::sun::star::uno::Sequence < sal_Int8 >
case Z_OK:
nOffset += nLength - pStream->avail_in;
nLength = pStream->avail_in;
- return nLength - pStream->avail_out;
+ return nNewLength - pStream->avail_out;
case Z_NEED_DICT:
bNeedDict = sal_True;
nOffset += nLength - pStream->avail_in;