diff options
author | Filippos Karapetis | 2016-10-03 01:44:09 +0300 |
---|---|---|
committer | Filippos Karapetis | 2016-10-03 01:44:09 +0300 |
commit | f61aee3c70a97152550814d2035189fad192b2d4 (patch) | |
tree | 0b7d8ffd0c0a1925e694f2b36ee36a4cceecb135 | |
parent | 8f9412984db5b647d159fe33abf122fb0d2d7060 (diff) | |
download | scummvm-rg350-f61aee3c70a97152550814d2035189fad192b2d4.tar.gz scummvm-rg350-f61aee3c70a97152550814d2035189fad192b2d4.tar.bz2 scummvm-rg350-f61aee3c70a97152550814d2035189fad192b2d4.zip |
CHEWY: Mask potentially overflown palette values
-rw-r--r-- | engines/chewy/resource.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/chewy/resource.cpp b/engines/chewy/resource.cpp index a30548c746..90849cd555 100644 --- a/engines/chewy/resource.cpp +++ b/engines/chewy/resource.cpp @@ -210,7 +210,7 @@ TBFChunk *BackgroundResource::getImage(uint num) { tbf->width = _stream.readUint16LE(); tbf->height = _stream.readUint16LE(); for (int j = 0; j < 3 * 256; j++) - tbf->palette[j] = _stream.readByte() << 2; + tbf->palette[j] = (_stream.readByte() << 2) & 0xff; tbf->data = new byte[tbf->size]; |