From 0572fa5d351c0cd1a34a69df76c81c48382be81b Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 1 Mar 2014 12:05:47 -0500 Subject: IMAGE: Handle bitmaps with an image size field of 0 --- image/bmp.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'image') diff --git a/image/bmp.cpp b/image/bmp.cpp index cdf6e4097d..28eb049035 100644 --- a/image/bmp.cpp +++ b/image/bmp.cpp @@ -119,6 +119,10 @@ bool BitmapDecoder::loadStream(Common::SeekableReadStream &stream) { if (!_codec) return false; + // If the image size is zero, set it to the rest of the stream. + if (imageSize == 0) + imageSize = stream.size() - imageOffset; + // Grab the frame data Common::SeekableSubReadStream subStream(&stream, imageOffset, imageOffset + imageSize); -- cgit v1.2.3