diff options
author | Matthew Hoops | 2012-09-17 12:35:17 -0400 |
---|---|---|
committer | Matthew Hoops | 2012-09-17 12:35:17 -0400 |
commit | 7759f47607ac9e24295ced6383943692568ec038 (patch) | |
tree | 4223ae5d884355bc297eba0d459370d2e237ec94 /graphics/decoders | |
parent | c0babb010a7f803e54f3021e9560d77baf69fdb8 (diff) | |
download | scummvm-rg350-7759f47607ac9e24295ced6383943692568ec038.tar.gz scummvm-rg350-7759f47607ac9e24295ced6383943692568ec038.tar.bz2 scummvm-rg350-7759f47607ac9e24295ced6383943692568ec038.zip |
GRAPHICS: Fix BMP palette color count with bpp != 8
Diffstat (limited to 'graphics/decoders')
-rw-r--r-- | graphics/decoders/bmp.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/graphics/decoders/bmp.cpp b/graphics/decoders/bmp.cpp index f15d4e2519..0d2165643d 100644 --- a/graphics/decoders/bmp.cpp +++ b/graphics/decoders/bmp.cpp @@ -100,10 +100,10 @@ bool BitmapDecoder::loadStream(Common::SeekableReadStream &stream) { _paletteColorCount = stream.readUint32LE(); /* uint32 colorsImportant = */ stream.readUint32LE(); - if (_paletteColorCount == 0) - _paletteColorCount = 256; - if (bitsPerPixel == 8) { + if (_paletteColorCount == 0) + _paletteColorCount = 256; + // Read the palette _palette = new byte[_paletteColorCount * 3]; for (uint16 i = 0; i < _paletteColorCount; i++) { |