projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Workaround for GTK+ sensitivity bug
[wxWidgets.git]
/
src
/
zlib
/
uncompr.c
diff --git
a/src/zlib/uncompr.c
b/src/zlib/uncompr.c
index f4d287b51842b6b53ec7eab432bc0bd56837ab92..b59e3d0defb24b22c83167609f2cc5eb7620b96b 100644
(file)
--- a/
src/zlib/uncompr.c
+++ b/
src/zlib/uncompr.c
@@
-1,11
+1,12
@@
/* uncompr.c -- decompress a memory buffer
/* uncompr.c -- decompress a memory buffer
- * Copyright (C) 1995-
1998
Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
+ * Copyright (C) 1995-
2003
Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
*/
/* @(#) $Id$ */
*/
/* @(#) $Id$ */
-#include "../zlib/zlib.h"
+#define ZLIB_INTERNAL
+#include "zlib.h"
/* ===========================================================================
Decompresses the source buffer into the destination buffer. sourceLen is
/* ===========================================================================
Decompresses the source buffer into the destination buffer. sourceLen is
@@
-49,7
+50,9
@@
int ZEXPORT uncompress (dest, destLen, source, sourceLen)
err = inflate(&stream, Z_FINISH);
if (err != Z_STREAM_END) {
inflateEnd(&stream);
err = inflate(&stream, Z_FINISH);
if (err != Z_STREAM_END) {
inflateEnd(&stream);
- return err == Z_OK ? Z_BUF_ERROR : err;
+ if (err == Z_NEED_DICT || (err == Z_BUF_ERROR && stream.avail_in == 0))
+ return Z_DATA_ERROR;
+ return err;
}
*destLen = stream.total_out;
}
*destLen = stream.total_out;