mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-09 03:10:22 +00:00
DIRECTOR: Add sanity check to BITDDecoder
This commit is contained in:
parent
42dc7451ad
commit
7989d65b26
@ -107,6 +107,12 @@ bool DIBDecoder::loadStream(Common::SeekableReadStream &stream) {
|
||||
BITDDecoder::BITDDecoder(int w, int h, uint16 bitsPerPixel, uint16 pitch) {
|
||||
_surface = new Graphics::Surface();
|
||||
|
||||
if (pitch < w) {
|
||||
warning("BITDDecoder: pitch is too small: %d < %d", pitch, w);
|
||||
|
||||
pitch = w;
|
||||
}
|
||||
|
||||
Graphics::PixelFormat pf = Graphics::PixelFormat::createFormatCLUT8();
|
||||
switch (bitsPerPixel) {
|
||||
case 2:
|
||||
|
Loading…
Reference in New Issue
Block a user