[Scummvm-git-logs] scummvm master -> a29254dda2c94f808b2fc4d91eb845e404dec564

bluegr bluegr at gmail.com
Fri Feb 8 01:41:30 CET 2019


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:
a29254dda2 SCI: Fix out of bounds issue in getFrameSize


Commit: a29254dda2c94f808b2fc4d91eb845e404dec564
    https://github.com/scummvm/scummvm/commit/a29254dda2c94f808b2fc4d91eb845e404dec564
Author: Jean-Christophe Rona (jc at rona.fr)
Date: 2019-02-08T02:41:26+02:00

Commit Message:
SCI: Fix out of bounds issue in getFrameSize

If there is no item at all, returns a (0,0,0,0) Rect.

Changed paths:
    engines/sci/video/robot_decoder.cpp


diff --git a/engines/sci/video/robot_decoder.cpp b/engines/sci/video/robot_decoder.cpp
index 8a0948d..a99a15a 100644
--- a/engines/sci/video/robot_decoder.cpp
+++ b/engines/sci/video/robot_decoder.cpp
@@ -1169,6 +1169,12 @@ bool RobotDecoder::readPartialAudioRecordAndSubmit(const int startFrame, const i
 
 uint16 RobotDecoder::getFrameSize(Common::Rect &outRect) const {
 	assert(_plane != nullptr);
+
+	if (_screenItemList.size() == 0) {
+		outRect.clip(0, 0);
+		return _numFramesTotal;
+	}
+
 	outRect = _screenItemList[0]->getNowSeenRect(*_plane);
 	for (RobotScreenItemList::size_type i = 1; i < _screenItemList.size(); ++i) {
 		ScreenItem &screenItem = *_screenItemList[i];





More information about the Scummvm-git-logs mailing list