aboutsummaryrefslogtreecommitdiff
path: root/image
diff options
context:
space:
mode:
authorMatthew Hoops2014-03-01 12:05:47 -0500
committerMatthew Hoops2014-03-01 12:05:47 -0500
commit0572fa5d351c0cd1a34a69df76c81c48382be81b (patch)
treed46419fcf81a30f735f4f9320916a8d09c144b3c /image
parent2218d14fb5276724c757406d5ac1ec581160721b (diff)
downloadscummvm-rg350-0572fa5d351c0cd1a34a69df76c81c48382be81b.tar.gz
scummvm-rg350-0572fa5d351c0cd1a34a69df76c81c48382be81b.tar.bz2
scummvm-rg350-0572fa5d351c0cd1a34a69df76c81c48382be81b.zip
IMAGE: Handle bitmaps with an image size field of 0
Diffstat (limited to 'image')
-rw-r--r--image/bmp.cpp4
1 files changed, 4 insertions, 0 deletions
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);