diff options
| author | Eugene Sandulenko | 2016-05-19 00:04:22 +0200 |
|---|---|---|
| committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
| commit | 9ed9a601165977780c45a562f38f36787918fe6d (patch) | |
| tree | 642a1bf76ecada7fef375670027905323ca3b9ac /engines | |
| parent | 1a3d44edc9b97c97b4ff9dc80747703a952f2409 (diff) | |
| download | scummvm-rg350-9ed9a601165977780c45a562f38f36787918fe6d.tar.gz scummvm-rg350-9ed9a601165977780c45a562f38f36787918fe6d.tar.bz2 scummvm-rg350-9ed9a601165977780c45a562f38f36787918fe6d.zip | |
DIRECTOR: Fix DIB file reading
Diffstat (limited to 'engines')
| -rw-r--r-- | engines/director/dib.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/director/dib.cpp b/engines/director/dib.cpp index a8fc7548a2..b59d688788 100644 --- a/engines/director/dib.cpp +++ b/engines/director/dib.cpp @@ -95,7 +95,7 @@ bool DIBDecoder::loadStream(Common::SeekableReadStream &stream) { uint32 height = stream.readUint32LE(); stream.readUint16LE(); // planes uint16 bitsPerPixel = stream.readUint16LE(); - uint32 compression = stream.readUint32LE(); + uint32 compression = stream.readUint32BE(); uint32 imageSize = stream.readUint32LE(); /* uint32 pixelsPerMeterX = */ stream.readUint32LE(); /* uint32 pixelsPerMeterY = */ stream.readUint32LE(); @@ -105,7 +105,7 @@ bool DIBDecoder::loadStream(Common::SeekableReadStream &stream) { _paletteColorCount = (_paletteColorCount == 0) ? 255: _paletteColorCount; uint16 imageRawSize = stream.size() - 40; - Common::SeekableSubReadStream subStream(&stream, 40, imageRawSize); + Common::SeekableSubReadStream subStream(&stream, 40, stream.size()); warning("w: %d h: %d bpp: %d pal: %d size: %d (size rep: %d) comp: %x", width, height, bitsPerPixel, _paletteColorCount, imageRawSize, imageSize, compression); |
