[Scummvm-cvs-logs] scummvm master -> 729810bbc10d1078cfa14df32ceed1d35c1d42d4

sev- sev at scummvm.org
Mon Jun 9 21:47:42 CEST 2014


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:
c41ebe6f45 COMMON: Added align() method for BitStream
df5ef5bf2e FULLPIPE: Safely copy strings
2e30e0fc7d FULLPIPE: Safely copy string. CID 1208908
39088eec05 FULLPIPE: Fix copy-paste error from original. CID 1199556
729810bbc1 FULLPIPE: Initialize variable. CID 1153659


Commit: c41ebe6f452d40cb84359aeff909e21cf6c4db29
    https://github.com/scummvm/scummvm/commit/c41ebe6f452d40cb84359aeff909e21cf6c4db29
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-06-09T22:33:45+03:00

Commit Message:
COMMON: Added align() method for BitStream

Changed paths:
    common/bitstream.h



diff --git a/common/bitstream.h b/common/bitstream.h
index 0fe16b5..b789f2a 100644
--- a/common/bitstream.h
+++ b/common/bitstream.h
@@ -52,6 +52,9 @@ public:
 	/** Skip the specified amount of bits. */
 	virtual void skip(uint32 n) = 0;
 
+	/** Skip the bits to closest data value border. */
+	virtual void align() = 0;
+
 	/** Read a bit from the bit stream. */
 	virtual uint32 getBit() = 0;
 
@@ -276,6 +279,12 @@ public:
 			getBit();
 	}
 
+	/** Skip the bits to closest data value border. */
+	void align() {
+		while (_inValue)
+			getBit();
+	}
+
 	/** Return the stream position in bits. */
 	uint32 pos() const {
 		if (_stream->pos() == 0)


Commit: df5ef5bf2e440de933685451a2b31dd3af695ecd
    https://github.com/scummvm/scummvm/commit/df5ef5bf2e440de933685451a2b31dd3af695ecd
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-06-09T22:34:21+03:00

Commit Message:
FULLPIPE: Safely copy strings

Changed paths:
    engines/fullpipe/sound.cpp



diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp
index 65c9bf8..a3f0f2a 100644
--- a/engines/fullpipe/sound.cpp
+++ b/engines/fullpipe/sound.cpp
@@ -268,7 +268,7 @@ void FullpipeEngine::setSceneMusicParameters(GameVar *gvar) {
 
 		while (sub) {
 			if (_musicAllowed & sub->_value.intValue) {
-				strcpy(_sceneTracks[_numSceneTracks], sub->_varName);
+				strncpy(_sceneTracks[_numSceneTracks], sub->_varName, 260);
 
 				_numSceneTracks++;
 			}


Commit: 2e30e0fc7d121bb9ed27f868cc8652230066d1d6
    https://github.com/scummvm/scummvm/commit/2e30e0fc7d121bb9ed27f868cc8652230066d1d6
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-06-09T22:36:01+03:00

Commit Message:
FULLPIPE: Safely copy string. CID 1208908

Changed paths:
    engines/fullpipe/sound.cpp



diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp
index a3f0f2a..b7641d5 100644
--- a/engines/fullpipe/sound.cpp
+++ b/engines/fullpipe/sound.cpp
@@ -432,7 +432,7 @@ void FullpipeEngine::playTrack(GameVar *sceneVar, const char *name, bool delayed
 
 		while (sub) {
 			if (_musicAllowed & sub->_value.intValue) {
-				strcpy(_sceneTracks[_numSceneTracks], sub->_varName);
+				strcpy(_sceneTracks[_numSceneTracks], sub->_varName, 260);
 
 				_numSceneTracks++;
 			}


Commit: 39088eec05c8cf8ba363def42e2c3aeecc38b397
    https://github.com/scummvm/scummvm/commit/39088eec05c8cf8ba363def42e2c3aeecc38b397
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-06-09T22:39:31+03:00

Commit Message:
FULLPIPE: Fix copy-paste error from original. CID 1199556

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



diff --git a/engines/fullpipe/scenes/scene29.cpp b/engines/fullpipe/scenes/scene29.cpp
index 2d51271..8f82e99 100644
--- a/engines/fullpipe/scenes/scene29.cpp
+++ b/engines/fullpipe/scenes/scene29.cpp
@@ -972,7 +972,7 @@ int sceneHandler29(ExCommand *cmd) {
 		break;
 
 	case MSG_SC29_SHOWLASTRED:
-		if (g_vars->scene29_balls.numBalls) {
+		if (g_vars->scene29_redBalls.numBalls) { // original uses scene29_balls which looks like a copy/paste error
 			g_vars->scene29_redBalls.field_8->ani->show1(-1, -1, -1, 0);
 			g_vars->scene29_redBalls.field_8->ani->startAnim(MV_SHR_HITASS, 0, -1);
 		}


Commit: 729810bbc10d1078cfa14df32ceed1d35c1d42d4
    https://github.com/scummvm/scummvm/commit/729810bbc10d1078cfa14df32ceed1d35c1d42d4
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-06-09T22:46:38+03:00

Commit Message:
FULLPIPE: Initialize variable. CID 1153659

Changed paths:
    engines/fullpipe/motion.cpp



diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 321df7f..66d587f 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -2430,7 +2430,7 @@ MessageQueue *MovGraph2::genMovement(MovInfo1 *info) {
 
 	int y = info->pt2.y - info->pt1.y - my2 - my1;
 	int x = info->pt2.x - info->pt1.x - mx2 - mx1;
-	int a2;
+	int a2 = 0;
 	int mgmLen;
 
 	_mgm.calcLength(&point, _items2[info->index]->_subItems[info->subIndex]._walk[1]._mov, x, y, &mgmLen, &a2, info->flags & 1);






More information about the Scummvm-git-logs mailing list