]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fixed signed/unsigned mismatch in deflate_medium in MSVC.
authorNathan Moinvaziri <nathan@nathanm.com>
Sun, 29 Mar 2020 19:03:58 +0000 (12:03 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Thu, 16 Apr 2020 11:05:23 +0000 (13:05 +0200)
deflate_medium.c

index 07ce71fe3376c15547547b9e623f0e3371383e93..43fb0bfcfc84754bfe8e7c0dd9c90f0bfae67593 100644 (file)
@@ -261,7 +261,7 @@ ZLIB_INTERNAL block_state deflate_medium(deflate_state *s, int flush) {
         insert_match(s, current_match);
 
         /* now, look ahead one */
-        if (s->lookahead > MIN_LOOKAHEAD && (current_match.strstart + current_match.match_length) < (s->window_size - MIN_LOOKAHEAD)) {
+        if (s->lookahead > MIN_LOOKAHEAD && (uint32_t)(current_match.strstart + current_match.match_length) < (s->window_size - MIN_LOOKAHEAD)) {
             s->strstart = current_match.strstart + current_match.match_length;
             hash_head = functable.insert_string(s, s->strstart, 1);