diff options
author | SlowRiot <rain.backnet@gmail.com> | 2014-11-07 02:44:27 +0000 |
---|---|---|
committer | SlowRiot <rain.backnet@gmail.com> | 2014-11-07 02:44:27 +0000 |
commit | 3b22b26e1c711f727e8e940a4b260819692d6d17 (patch) | |
tree | ac2f3238c8d351d479c004635282f9b311a4fe12 | |
parent | 3aad3b531ff025a6fb0000d04f528810f1c707cf (diff) |
do not check unsigned windowsize for < 0
-rw-r--r-- | lodepng.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lodepng.cpp b/lodepng.cpp index 2be3fbe..426236e 100644 --- a/lodepng.cpp +++ b/lodepng.cpp @@ -1468,7 +1468,7 @@ static unsigned encodeLZ77(uivector* out, Hash* hash, const unsigned char *lastptr, *foreptr, *backptr; unsigned hashpos; - if(windowsize <= 0 || windowsize > 32768) return 60; /*error: windowsize smaller/larger than allowed*/ + if(windowsize == 0 || windowsize > 32768) return 60; /*error: windowsize smaller/larger than allowed*/ if((windowsize & (windowsize - 1)) != 0) return 90; /*error: must be power of two*/ if(nicematch > MAX_SUPPORTED_DEFLATE_LENGTH) nicematch = MAX_SUPPORTED_DEFLATE_LENGTH; |