diff options
-rw-r--r-- | engines/glk/frotz/pics.cpp | 1 | ||||
-rw-r--r-- | engines/glk/raw_decoder.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/engines/glk/frotz/pics.cpp b/engines/glk/frotz/pics.cpp index bda24acf52..86cd5feb25 100644 --- a/engines/glk/frotz/pics.cpp +++ b/engines/glk/frotz/pics.cpp @@ -150,6 +150,7 @@ Common::SeekableReadStream *Pics::createReadStreamForMember(const Common::String palette.resize(f.readByte() * 3); f.read(&palette[0], palette.size()); + f.seek(e._dataOffset); Common::SeekableReadStream *src = f.readStream(e._dataSize); dest = decoder.decode(*src, e._flags, palette, kMCGA, e._width, e._height); delete src; diff --git a/engines/glk/raw_decoder.cpp b/engines/glk/raw_decoder.cpp index e0899e09dc..659b333cac 100644 --- a/engines/glk/raw_decoder.cpp +++ b/engines/glk/raw_decoder.cpp @@ -56,7 +56,7 @@ bool RawDecoder::loadStream(Common::SeekableReadStream &stream) { stream.readByte(); _surface.create(width, height, Graphics::PixelFormat::createFormatCLUT8()); - assert((stream.size() - stream.pos()) == (int)(width * height)); + assert((stream.size() - stream.pos()) <= (int)(width * height)); byte *pixels = (byte *)_surface.getPixels(); stream.read(pixels, width * height); |