DIRECTOR: Fix regression in BITD image parsing

This commit is contained in:
Eugene Sandulenko 2020-01-23 15:03:25 +01:00
parent ae6155f781
commit 7913684285

View File

@ -202,8 +202,8 @@ bool BITDDecoder::loadStream(Common::SeekableReadStream &stream) {
stream.readUint16BE();
}
if (pixels.size() < _surface->pitch * _surface->h) {
int tail = _surface->pitch * _surface->h - pixels.size();
if (pixels.size() < _surface->w * _surface->h) {
int tail = _surface->w * _surface->h - pixels.size();
warning("BITDDecoder::loadStream(): premature end of stream (%d of %d pixels)",
pixels.size(), pixels.size() + tail);