fix brotli decoder MSVC compilation error

This commit is contained in:
Lode Vandevenne 2015-08-10 14:18:37 +02:00
parent 94cd7085f7
commit fee303fd87
2 changed files with 5 additions and 1 deletions

View File

@ -41,7 +41,11 @@ void BrotliWarmupBitReader(BrotliBitReader* const br) {
size_t i;
br->val_ = 0;
for (i = 0; i < sizeof(br->val_); ++i) {
#if (BROTLI_64_BITS_LITTLE_ENDIAN)
br->val_ |= ((uint64_t)*br->next_in) << (8 * i);
#else
br->val_ |= ((uint32_t)*br->next_in) << (8 * i);
#endif
++br->next_in;
--br->avail_in;
}

View File

@ -162,9 +162,9 @@ static BROTLI_INLINE void BrotliFillBitWindow(
while (br->bit_pos_ >= 8) {
br->val_ >>= 8;
br->val_ |= ((uint32_t)*br->next_in) << 24;
++br->pos_;
br->bit_pos_ -= 8;
--br->avail_in;
++br->next_in;
}
#endif
}