Skip to content

Commit

Permalink
COMMON: Fix UB, left shift of negative value
Browse files Browse the repository at this point in the history
  • Loading branch information
bonki authored and sev- committed Mar 22, 2018
1 parent 001f243 commit d623ec2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/dcl.cpp
Expand Up @@ -98,7 +98,7 @@ uint32 DecompressorDCL::getBitsLSB(int n) {
// Fetching more data to buffer if needed
if (_nBits < n)
fetchBitsLSB();
uint32 ret = (_dwBits & ~((~0) << n));
uint32 ret = (_dwBits & ~(~0UL << n));
_dwBits >>= n;
_nBits -= n;
return ret;
Expand Down

0 comments on commit d623ec2

Please sign in to comment.