[Scummvm-cvs-logs] scummvm master -> 7da48233ce9a0154364bf26c1e419d24e70f2a26

sev- sev at scummvm.org
Sun Jan 4 19:34:28 CET 2015


This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
c3def28b99 FULLPIPE: Fix crash in scene04
308bfe3b9c FULLPIPE: Remove redundant check
4393d38a31 FULLPIPE: Plug memory leak
882e0ca8cb FULLPIPE: Sanity check
7da48233ce FULLPIPE: Fix bug in inventory


Commit: c3def28b9964066165b8627d0129578504734ab2
    https://github.com/scummvm/scummvm/commit/c3def28b9964066165b8627d0129578504734ab2
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2015-01-03T20:17:47+01:00

Commit Message:
FULLPIPE: Fix crash in scene04

Changed paths:
    engines/fullpipe/mgm.cpp



diff --git a/engines/fullpipe/mgm.cpp b/engines/fullpipe/mgm.cpp
index aacfd54..1c8ca2a 100644
--- a/engines/fullpipe/mgm.cpp
+++ b/engines/fullpipe/mgm.cpp
@@ -155,13 +155,14 @@ void MGM::rebuildTables(int objId) {
 	if (!obj)
 		return;
 
-	for (uint i = 0; i < obj->_staticsList.size(); i++)
+	for (uint i = 0; i < obj->_staticsList.size(); i++) {
 		_items[idx]->statics.push_back((Statics *)obj->_staticsList[i]);
 
+		_items[idx]->subItems.push_back(new MGMSubItem);
+	}
+
 	for (uint i = 0; i < obj->_movements.size(); i++)
 		_items[idx]->movements1.push_back((Movement *)obj->_movements[i]);
-
-	_items[idx]->subItems.clear();
 }
 
 int MGM::getItemIndexById(int objId) {


Commit: 308bfe3b9cfda6ae2dd0558fcecfaa628e816b60
    https://github.com/scummvm/scummvm/commit/308bfe3b9cfda6ae2dd0558fcecfaa628e816b60
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2015-01-04T19:16:34+01:00

Commit Message:
FULLPIPE: Remove redundant check

Changed paths:
    engines/fullpipe/scenes/scene16.cpp



diff --git a/engines/fullpipe/scenes/scene16.cpp b/engines/fullpipe/scenes/scene16.cpp
index e9d3a37..df00595 100644
--- a/engines/fullpipe/scenes/scene16.cpp
+++ b/engines/fullpipe/scenes/scene16.cpp
@@ -182,7 +182,7 @@ void sceneHandler16_fillMug() {
 			mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC16_BOYOUT), 0, 1);
 
 			mq->replaceKeyCode(-1, g_vars->scene16_walkingBoy->_okeyCode);
-			if (!mq || mq->chain(g_vars->scene16_walkingBoy))
+			if (mq->chain(g_vars->scene16_walkingBoy))
 				return;
 		} else {
 			if (!g_vars->scene16_walkingGirl)


Commit: 4393d38a311df69f473febc5c2fdf135694609e9
    https://github.com/scummvm/scummvm/commit/4393d38a311df69f473febc5c2fdf135694609e9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2015-01-04T19:18:41+01:00

Commit Message:
FULLPIPE: Plug memory leak

Changed paths:
    engines/fullpipe/statics.cpp



diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index 880c2eb..6b35159 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -1048,8 +1048,11 @@ MessageQueue *StaticANIObject::changeStatics1(int msgNum) {
 		if (_flags & 1)
 			_messageQueueId = mq->_id;
 	} else {
-		if (!queueMessageQueue(mq))
+		if (!queueMessageQueue(mq)) {
+			delete mq;
+
 			return 0;
+		}
 
 		g_fp->_globalMessageQueueList->addMessageQueue(mq);
 	}


Commit: 882e0ca8cbc507cfba8dec1a340be9f5462069c3
    https://github.com/scummvm/scummvm/commit/882e0ca8cbc507cfba8dec1a340be9f5462069c3
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2015-01-04T19:23:43+01:00

Commit Message:
FULLPIPE: Sanity check

Changed paths:
    engines/fullpipe/statics.cpp



diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index 6b35159..de3e1ea 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -1597,6 +1597,12 @@ Movement::Movement(Movement *src, int *oldIdxs, int newSize, StaticANIObject *an
 		newSize = src->_dynamicPhases.size();
 	}
 
+	if (!newSize) {
+		warning("Movement::Movement: newSize = 0");
+
+		return;
+	}
+
 	_framePosOffsets = (Common::Point **)calloc(newSize, sizeof(Common::Point *));
 
 	for (int i = 0; i < newSize; i++)


Commit: 7da48233ce9a0154364bf26c1e419d24e70f2a26
    https://github.com/scummvm/scummvm/commit/7da48233ce9a0154364bf26c1e419d24e70f2a26
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2015-01-04T19:32:26+01:00

Commit Message:
FULLPIPE: Fix bug in inventory

Changed paths:
    engines/fullpipe/inventory.cpp



diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp
index e79f9c5..f9b507c 100644
--- a/engines/fullpipe/inventory.cpp
+++ b/engines/fullpipe/inventory.cpp
@@ -126,7 +126,7 @@ void Inventory2::removeItem2(Scene *sceneObj, int itemId, int x, int y, int prio
 	int idx = getInventoryItemIndexById(itemId);
 
 	if (idx >= 0) {
-		if (_inventoryItems[idx]->itemId >> 16) {
+		if (_inventoryItems[idx]->count) {
 			removeItem(itemId, 1);
 
 			Scene *sc = g_fp->accessScene(_sceneId);






More information about the Scummvm-git-logs mailing list