[Scummvm-cvs-logs] scummvm master -> 867efd477c18294c13e58c84e067c4c540c6f8b5

bluegr bluegr at gmail.com
Tue Feb 11 18:20:02 CET 2014


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:
867efd477c WINTERMUTE: Prevent scripts from setting invalid scroll times


Commit: 867efd477c18294c13e58c84e067c4c540c6f8b5
    https://github.com/scummvm/scummvm/commit/867efd477c18294c13e58c84e067c4c540c6f8b5
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2014-02-11T09:09:39-08:00

Commit Message:
WINTERMUTE: Prevent scripts from setting invalid scroll times

Scroll times (ScrollSpeedX, ScrollSpeedY) can't be zero, as this leads
to a division by zero later on. This allows Dreamscape to start and
work properly.

Changed paths:
    engines/wintermute/ad/ad_scene.cpp



diff --git a/engines/wintermute/ad/ad_scene.cpp b/engines/wintermute/ad/ad_scene.cpp
index ab7ab51..df944ba 100644
--- a/engines/wintermute/ad/ad_scene.cpp
+++ b/engines/wintermute/ad/ad_scene.cpp
@@ -2041,6 +2041,10 @@ bool AdScene::scSetProperty(const char *name, ScValue *value) {
 	//////////////////////////////////////////////////////////////////////////
 	else if (strcmp(name, "ScrollSpeedX") == 0) {
 		_scrollTimeH = value->getInt();
+		if (_scrollTimeH == 0) {
+			warning("_scrollTimeH can't be 0, resetting to default");
+			_scrollTimeH = 10;
+		}
 		return STATUS_OK;
 	}
 
@@ -2049,6 +2053,10 @@ bool AdScene::scSetProperty(const char *name, ScValue *value) {
 	//////////////////////////////////////////////////////////////////////////
 	else if (strcmp(name, "ScrollSpeedY") == 0) {
 		_scrollTimeV = value->getInt();
+		if (_scrollTimeV == 0) {
+			warning("_scrollTimeV can't be 0, resetting to default");
+			_scrollTimeV = 10;
+		}
 		return STATUS_OK;
 	}
 






More information about the Scummvm-git-logs mailing list