diff options
author | Adrian Frühwirth | 2018-03-22 21:06:38 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2018-03-22 22:16:24 +0100 |
commit | d623ec2c38e62567525cc84554a3fd7c4e3bfef4 (patch) | |
tree | 0188a8ad1ae9a296a64543294e00b563f46f5eac | |
parent | 001f2434c6c09a2121fc60f5fa4bd54f6303d75f (diff) | |
download | scummvm-rg350-d623ec2c38e62567525cc84554a3fd7c4e3bfef4.tar.gz scummvm-rg350-d623ec2c38e62567525cc84554a3fd7c4e3bfef4.tar.bz2 scummvm-rg350-d623ec2c38e62567525cc84554a3fd7c4e3bfef4.zip |
COMMON: Fix UB, left shift of negative value
-rw-r--r-- | common/dcl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/dcl.cpp b/common/dcl.cpp index 75a533aa9d..7c2fc2ce80 100644 --- a/common/dcl.cpp +++ b/common/dcl.cpp @@ -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; |