summaryrefslogtreecommitdiff
path: root/thirdparty/libwebp/src/utils/bit_reader_inl_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/libwebp/src/utils/bit_reader_inl_utils.h')
-rw-r--r--thirdparty/libwebp/src/utils/bit_reader_inl_utils.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/thirdparty/libwebp/src/utils/bit_reader_inl_utils.h b/thirdparty/libwebp/src/utils/bit_reader_inl_utils.h
index 404b9a6d8c..24f3af7b54 100644
--- a/thirdparty/libwebp/src/utils/bit_reader_inl_utils.h
+++ b/thirdparty/libwebp/src/utils/bit_reader_inl_utils.h
@@ -148,9 +148,9 @@ int VP8GetSigned(VP8BitReader* WEBP_RESTRICT const br, int v,
const range_t value = (range_t)(br->value_ >> pos);
const int32_t mask = (int32_t)(split - value) >> 31; // -1 or 0
br->bits_ -= 1;
- br->range_ += mask;
+ br->range_ += (range_t)mask;
br->range_ |= 1;
- br->value_ -= (bit_t)((split + 1) & mask) << pos;
+ br->value_ -= (bit_t)((split + 1) & (uint32_t)mask) << pos;
BT_TRACK(br);
return (v ^ mask) - mask;
}