diff options
author | Paul Gilbert | 2019-01-03 18:18:53 -0800 |
---|---|---|
committer | Paul Gilbert | 2019-01-03 18:18:53 -0800 |
commit | c4c14b593ba254d1f3f1159b1b23c166667a7e56 (patch) | |
tree | 2b9b7963b0ab075f2a1d33a92e870869eeaa08fd /engines | |
parent | d5bf1396def859fcdbfc541e19df37f1dca5552c (diff) | |
download | scummvm-rg350-c4c14b593ba254d1f3f1159b1b23c166667a7e56.tar.gz scummvm-rg350-c4c14b593ba254d1f3f1159b1b23c166667a7e56.tar.bz2 scummvm-rg350-c4c14b593ba254d1f3f1159b1b23c166667a7e56.zip |
GLK: FROTZ: Fixes for picture decoding
Diffstat (limited to 'engines')
-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); |