Fix incorrect padding construction spotted by Xcode Analyzer

This commit is contained in:
Nikolaj Schlej 2020-11-22 20:56:51 -08:00
parent 115d338a70
commit 5645599c58
3 changed files with 20 additions and 19 deletions

View file

@ -1341,7 +1341,7 @@ local uInt longest_match(s, cur_match)
* are always equal when the other bytes match, given that
* the hash keys are equal and that HASH_BITS >= 8.
*/
scan += 2, match++;
scan += 2; match++;
Assert(*scan == *match, "match[2]?");
/* We check for insufficient lookahead only every 8th comparison;
@ -1958,7 +1958,7 @@ local block_state deflate_slow(s, flush)
/* Find the longest match, discarding those <= prev_length.
*/
s->prev_length = s->match_length, s->prev_match = s->match_start;
s->prev_length = s->match_length; s->prev_match = s->match_start;
s->match_length = MIN_MATCH-1;
if (hash_head != NIL && s->prev_length < s->max_lazy_match &&