WINTERMUTE: Make sure the TGA-decoder returns false on error

This commit is contained in:
Einar Johan Trøan Sømåen 2012-06-19 03:11:57 +02:00
parent c59507a6e9
commit e3a7921dff

View File

@ -50,7 +50,7 @@ bool TGA::loadStream(Common::SeekableReadStream &tga) {
success = readHeader(tga, imageType, pixelDepth);
success = readData (tga, imageType, pixelDepth);
if (tga.err()) {
if (tga.err() || !success) {
warning("Failed reading TGA-file");
return false;
}