Use a uniform approach for the largest value of an unsigned type.

This commit is contained in:
Mark Adler
2016-12-31 08:49:17 -08:00
parent f3fcb92cf6
commit b7fbee2156
3 changed files with 3 additions and 3 deletions

View File

@@ -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 */