Clean up portability for shifts and integer sizes.

This commit is contained in:
Mark Adler
2015-09-05 18:56:55 -07:00
parent e54e129940
commit 44ae761dc2
3 changed files with 4 additions and 4 deletions

View File

@@ -243,7 +243,7 @@ int value;
}
if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR;
value &= (1L << bits) - 1;
state->hold += value << state->bits;
state->hold += (unsigned)value << state->bits;
state->bits += bits;
return Z_OK;
}