diff options
author | Bertrand Augereau | 2012-08-30 18:13:00 +0200 |
---|---|---|
committer | Bertrand Augereau | 2012-08-30 18:13:00 +0200 |
commit | 3b4d713ba114a692354f2a9dc68d7b9c3cfe5560 (patch) | |
tree | c47a0656346c07dde21af0a42b5af02442286f99 /graphics | |
parent | f87154def8c54722c8068e9ee9130c30ab393537 (diff) | |
download | scummvm-rg350-3b4d713ba114a692354f2a9dc68d7b9c3cfe5560.tar.gz scummvm-rg350-3b4d713ba114a692354f2a9dc68d7b9c3cfe5560.tar.bz2 scummvm-rg350-3b4d713ba114a692354f2a9dc68d7b9c3cfe5560.zip |
GRAPHICS: Undefined behaviour/warnings removal in the TGA decoder
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/decoders/tga.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/graphics/decoders/tga.cpp b/graphics/decoders/tga.cpp index 7d214a6f24..c27cd2b20b 100644 --- a/graphics/decoders/tga.cpp +++ b/graphics/decoders/tga.cpp @@ -191,6 +191,9 @@ bool TGADecoder::readColorMap(Common::SeekableReadStream &tga, byte imageType, b PixelFormat format(2, 5, 5, 5, 0, 10, 5, 0, 15); uint16 color = tga.readUint16LE(); format.colorToARGB(color, a, r, g, b); + } else { + warning("Unsupported image type: %d", imageType); + r = g = b = a = 0; } #ifdef SCUMM_LITTLE_ENDIAN _colorMap[i] = r; |