[Scummvm-git-logs] scummvm master -> 99e973f5ec94f325b889eab644d06b30bdbd8fde
npjg
nathanael.gentrydb8 at gmail.com
Tue Jul 21 15:28:12 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
99e973f5ec DIRECTOR: More carefully check for end of bitmap stream
Commit: 99e973f5ec94f325b889eab644d06b30bdbd8fde
https://github.com/scummvm/scummvm/commit/99e973f5ec94f325b889eab644d06b30bdbd8fde
Author: Nathanael Gentry (nathanael.gentrydb8 at gmail.com)
Date: 2020-07-21T11:27:54-04:00
Commit Message:
DIRECTOR: More carefully check for end of bitmap stream
This is a patch for the bitmap loading bug introduced in 3d1a68a3ed46517abb2f547efd85d910dad05768.
Changed paths:
engines/director/castmember.cpp
diff --git a/engines/director/castmember.cpp b/engines/director/castmember.cpp
index aec256c04f..14eed61c36 100644
--- a/engines/director/castmember.cpp
+++ b/engines/director/castmember.cpp
@@ -95,21 +95,27 @@ BitmapCastMember::BitmapCastMember(Cast *cast, uint16 castId, Common::ReadStream
_regX = stream.readUint16();
_bitsPerPixel = stream.readUint16();
+
+ if (stream.eos()) {
+ _bitsPerPixel = 0;
+ } else {
+ _clut = (PaletteType)stream.readUint16();
+ stream.readUint16();
+ /* uint16 unk1 = */ stream.readUint16();
+ stream.readUint16();
+
+ stream.readUint32();
+ stream.readUint32();
+
+ _flags2 = stream.readUint16();
+ }
+
if (_bitsPerPixel == 0)
_bitsPerPixel = 1;
if (_bitsPerPixel == 1)
_pitch *= 8;
- _clut = (PaletteType)stream.readUint16();
- stream.readUint16();
- /* uint16 unk1 = */ stream.readUint16();
- stream.readUint16();
-
- stream.readUint32();
- stream.readUint32();
-
- _flags2 = stream.readUint16();
_autoHilite = (_flags2 % 4 != 0);
int tail = 0;
More information about the Scummvm-git-logs
mailing list