aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorMatthew Hoops2012-10-16 22:15:09 -0400
committerMatthew Hoops2012-10-16 22:15:09 -0400
commitc645f7dc9334a34c4b48684297ceb17e3595b827 (patch)
treee63e64d595a5b8378d4f040abcd1b73543442e80 /graphics
parent5023a5764f3c4f394f9454685340d89f8cb571af (diff)
downloadscummvm-rg350-c645f7dc9334a34c4b48684297ceb17e3595b827.tar.gz
scummvm-rg350-c645f7dc9334a34c4b48684297ceb17e3595b827.tar.bz2
scummvm-rg350-c645f7dc9334a34c4b48684297ceb17e3595b827.zip
GRAPHICS: Make failing to find the PICT header return false from loadStream
Diffstat (limited to 'graphics')
-rw-r--r--graphics/decoders/pict.cpp11
1 files changed, 7 insertions, 4 deletions
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.