diff options
Diffstat (limited to 'src/misc/bzlib/decompress.c')
-rw-r--r-- | src/misc/bzlib/decompress.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/misc/bzlib/decompress.c b/src/misc/bzlib/decompress.c index bba5e0fa..47dd98e4 100644 --- a/src/misc/bzlib/decompress.c +++ b/src/misc/bzlib/decompress.c @@ -21,6 +21,9 @@ #include "bzlib_private.h" +ABC_NAMESPACE_IMPL_START + + /*---------------------------------------------------*/ static @@ -209,13 +212,13 @@ Int32 BZ2_decompress ( DState* s ) s->blockSize100k -= BZ_HDR_0; if (s->smallDecompress) { - s->ll16 = BZALLOC( s->blockSize100k * 100000 * sizeof(UInt16) ); - s->ll4 = BZALLOC( + s->ll16 = (unsigned short *)BZALLOC( s->blockSize100k * 100000 * sizeof(UInt16) ); + s->ll4 = (unsigned char *)BZALLOC( ((1 + s->blockSize100k * 100000) >> 1) * sizeof(UChar) ); if (s->ll16 == NULL || s->ll4 == NULL) RETURN(BZ_MEM_ERROR); } else { - s->tt = BZALLOC( s->blockSize100k * 100000 * sizeof(Int32) ); + s->tt = (unsigned *)BZALLOC( s->blockSize100k * 100000 * sizeof(Int32) ); if (s->tt == NULL) RETURN(BZ_MEM_ERROR); } @@ -624,3 +627,5 @@ Int32 BZ2_decompress ( DState* s ) /*-------------------------------------------------------------*/ /*--- end decompress.c ---*/ /*-------------------------------------------------------------*/ +ABC_NAMESPACE_IMPL_END + |