From ceba3a6ce9481e08ccb51b2910b251c99541a9ac Mon Sep 17 00:00:00 2001 From: Arnaud Boutonné Date: Sat, 6 Feb 2010 22:47:13 +0000 Subject: Add an assert to avoid a crash when printing the character 0x00. svn-id: r47944 --- graphics/video/coktelvideo/coktelvideo.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/graphics/video/coktelvideo/coktelvideo.cpp b/graphics/video/coktelvideo/coktelvideo.cpp index 7092826bf8..12ba33a8ab 100644 --- a/graphics/video/coktelvideo/coktelvideo.cpp +++ b/graphics/video/coktelvideo/coktelvideo.cpp @@ -271,27 +271,32 @@ bool Imd::load(Common::SeekableReadStream &stream) { _stream->read((byte *) _palette, 768); if (!loadCoordinates()) { + warning("Imd::load(): loadCoordinates failed"); unload(); return false; } uint32 framesPosPos, frameCoordsPos; if (!loadFrameTableOffsets(framesPosPos, frameCoordsPos)) { + warning("Imd::load(): loadFrameTableOffsets failed"); unload(); return false; } if (!assessAudioProperties()) { + warning("Imd::load(): assessAudioProperties failed"); unload(); return false; } if (!assessVideoProperties()) { + warning("Imd::load(): assessVideoProperties failed"); unload(); return false; } if (!loadFrameTables(framesPosPos, frameCoordsPos)) { + warning("Imd::load(): loadFrameTables failed"); unload(); return false; } -- cgit v1.2.3