diff options
-rw-r--r-- | engines/director/images.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/director/images.cpp b/engines/director/images.cpp index 3d031c7518..10d73accc1 100644 --- a/engines/director/images.cpp +++ b/engines/director/images.cpp @@ -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: |