File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
bitreader/include/bitreader Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -230,7 +230,8 @@ namespace brcpp {
230230 {
231231 state.shift -= bits;
232232 const auto shifted = static_cast <T>(state.buffer >> state.shift );
233- ret |= shifted & _mask<T>(bits);
233+ const auto masked = static_cast <T>(shifted & _mask<T>(bits));
234+ ret |= masked;
234235 }
235236
236237 // ----------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ namespace brcpp {
6262 size_t post = std::min<uint64_t >(_state.avail , to_write);
6363 T portion = (data >> (bits - written - post )) & _mask<T>(post );
6464 size_t diff = _state.avail - post ;
65- _state.buffer |= portion << diff;
65+ _state.buffer |= static_cast <internal_state::buffer_type>( portion << diff) ;
6666 _state.avail -= post ;
6767
6868 if (_state.avail == 0 ) {
You can’t perform that action at this time.
0 commit comments