aboutsummaryrefslogtreecommitdiff
path: root/graphics/decoders
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/decoders')
-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.