From 7759f47607ac9e24295ced6383943692568ec038 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 17 Sep 2012 12:35:17 -0400 Subject: GRAPHICS: Fix BMP palette color count with bpp != 8 --- graphics/decoders/bmp.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'graphics/decoders') 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++) { -- cgit v1.2.3