Updated zlib to avoid test about truncation of data

This commit is contained in:
zilmar 2012-09-26 10:37:25 +10:00
parent 99ef569eae
commit a6100a1d8c
1 changed files with 1 additions and 1 deletions

View File

@ -204,7 +204,7 @@ local void send_bits(s, value, length)
* unused bits in value.
*/
if (s->bi_valid > (int)Buf_size - length) {
s->bi_buf |= (ush)value << s->bi_valid;
s->bi_buf |= (value << s->bi_valid) & 0xFFFF;
put_short(s, s->bi_buf);
s->bi_buf = (ush)value >> (Buf_size - s->bi_valid);
s->bi_valid += length - Buf_size;