From: Mika Lindqvist Date: Thu, 21 Sep 2017 17:16:20 +0000 (+0300) Subject: [Issue #126] Fix implicit cast from unsigned char to int. X-Git-Tag: 1.9.9-b1~659^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F127%2Fhead;p=thirdparty%2Fzlib-ng.git [Issue #126] Fix implicit cast from unsigned char to int. --- diff --git a/inflate.c b/inflate.c index 1b5a5548..04f827c3 100644 --- a/inflate.c +++ b/inflate.c @@ -483,7 +483,7 @@ static int updatewindow(z_stream *strm, const unsigned char *end, uint32_t copy) do { \ if (have == 0) goto inf_leave; \ have--; \ - hold += (*next++ << bits); \ + hold += ((unsigned)(*next++) << bits); \ bits += 8; \ } while (0)