From c645f7dc9334a34c4b48684297ceb17e3595b827 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Tue, 16 Oct 2012 22:15:09 -0400 Subject: GRAPHICS: Make failing to find the PICT header return false from loadStream --- graphics/decoders/pict.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'graphics/decoders') diff --git a/graphics/decoders/pict.cpp b/graphics/decoders/pict.cpp index d35e5c3064..b1d408ebc3 100644 --- a/graphics/decoders/pict.cpp +++ b/graphics/decoders/pict.cpp @@ -235,10 +235,13 @@ bool PICTDecoder::loadStream(Common::SeekableReadStream &stream) { // PICT v2 opcodes are two bytes uint16 opcode = stream.readUint16BE(); - if (opNum == 0 && opcode != 0x0011) - error("Cannot find PICT version opcode"); - else if (opNum == 1 && opcode != 0x0C00) - error("Cannot find PICT header opcode"); + if (opNum == 0 && opcode != 0x0011) { + warning("Cannot find PICT version opcode"); + return false; + } else if (opNum == 1 && opcode != 0x0C00) { + warning("Cannot find PICT header opcode"); + return false; + } // Since opcodes are word-aligned, we need to mark our starting // position here. -- cgit v1.2.3