]> git.lizzy.rs Git - zlib.git/blobdiff - uncompr.c
Use a uniform approach for the largest value of an unsigned type.
[zlib.git] / uncompr.c
index 2fbfcc0c5176d4fe50f9c551f43c913685c3fe66..f03a1a865e347d10ac16f6a70b2bc2fdc5235f9c 100644 (file)
--- a/uncompr.c
+++ b/uncompr.c
@@ -32,7 +32,7 @@ int ZEXPORT uncompress2 (dest, destLen, source, sourceLen)
 {
     z_stream stream;
     int err;
-    const uInt max = (uInt)0 - 1;
+    const uInt max = (uInt)-1;
     uLong len, left;
     Byte buf[1];    /* for detection of incomplete stream when *destLen == 0 */