DIRECTOR: Fix crash on optimized out 32-bpp pictures

They still are not rendered correctly
This commit is contained in:
Eugene Sandulenko 2020-04-11 13:04:30 +02:00
parent a456938dab
commit 278c6c809e

View File

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