diff options
author | Colin Snover | 2017-11-19 12:46:21 -0600 |
---|---|---|
committer | Colin Snover | 2017-11-19 12:48:14 -0600 |
commit | 617497d09454694c8601c044613e56c75b777062 (patch) | |
tree | 2b29ca1c8b19ad0ea70c371cfae33a17e89cc85a /engines/sci/decompressor.cpp | |
parent | d874208520746df2d73b775902e3269350e9ea40 (diff) | |
download | scummvm-rg350-617497d09454694c8601c044613e56c75b777062.tar.gz scummvm-rg350-617497d09454694c8601c044613e56c75b777062.tar.bz2 scummvm-rg350-617497d09454694c8601c044613e56c75b777062.zip |
SCI: Fix UB shifting negative integers
Diffstat (limited to 'engines/sci/decompressor.cpp')
-rw-r--r-- | engines/sci/decompressor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sci/decompressor.cpp b/engines/sci/decompressor.cpp index ca2298e67e..158119fe86 100644 --- a/engines/sci/decompressor.cpp +++ b/engines/sci/decompressor.cpp @@ -89,7 +89,7 @@ uint32 Decompressor::getBitsLSB(int n) { // fetching more data to buffer if needed if (_nBits < n) fetchBitsLSB(); - uint32 ret = (_dwBits & ~((~0) << n)); + uint32 ret = (_dwBits & ~(0xFFFFFFFFU << n)); _dwBits >>= n; _nBits -= n; return ret; |