aboutsummaryrefslogtreecommitdiff
path: root/video
diff options
context:
space:
mode:
Diffstat (limited to 'video')
-rw-r--r--video/smk_decoder.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/video/smk_decoder.cpp b/video/smk_decoder.cpp
index c4c3721a28..adb8fad8d8 100644
--- a/video/smk_decoder.cpp
+++ b/video/smk_decoder.cpp
@@ -372,9 +372,11 @@ bool SmackerDecoder::loadStream(Common::SeekableReadStream *stream) {
_fileStream = stream;
- // Seek to the first frame
+ // Read in the Smacker header
_header.signature = _fileStream->readUint32BE();
- assert(_header.signature == MKTAG('S','M','K','2') || _header.signature == MKTAG('S','M','K','4'));
+
+ if (_header.signature != MKTAG('S', 'M', 'K', '2') && _header.signature == MKTAG('S', 'M', 'K', '4'))
+ return false;
uint32 width = _fileStream->readUint32LE();
uint32 height = _fileStream->readUint32LE();