summaryrefslogtreecommitdiff
path: root/thirdparty/libwebp/src/utils/bit_writer_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/libwebp/src/utils/bit_writer_utils.c')
-rw-r--r--thirdparty/libwebp/src/utils/bit_writer_utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thirdparty/libwebp/src/utils/bit_writer_utils.c b/thirdparty/libwebp/src/utils/bit_writer_utils.c
index 7f83b4c8a2..bef0e31ca5 100644
--- a/thirdparty/libwebp/src/utils/bit_writer_utils.c
+++ b/thirdparty/libwebp/src/utils/bit_writer_utils.c
@@ -70,7 +70,7 @@ static void Flush(VP8BitWriter* const bw) {
const int value = (bits & 0x100) ? 0x00 : 0xff;
for (; bw->run_ > 0; --bw->run_) bw->buf_[pos++] = value;
}
- bw->buf_[pos++] = bits;
+ bw->buf_[pos++] = bits & 0xff;
bw->pos_ = pos;
} else {
bw->run_++; // delay writing of bytes 0xff, pending eventual carry.