[Scummvm-cvs-logs] scummvm master -> 4411c816f6a2cabf271ea9363768490806872f88

eriktorbjorn eriktorbjorn at telia.com
Wed Apr 16 18:11:00 CEST 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:
4411c816f6 FULLPIPE: Fix GCC warning


Commit: 4411c816f6a2cabf271ea9363768490806872f88
    https://github.com/scummvm/scummvm/commit/4411c816f6a2cabf271ea9363768490806872f88
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2014-04-16T18:09:13+02:00

Commit Message:
FULLPIPE: Fix GCC warning

I assume that the purpose of realloc() here is to increase the
_points memory area, but it's not guaranteed that the new block
will start at the same address as the old one.

Changed paths:
    engines/fullpipe/statics.cpp



diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index 0b13e53..a3a160b 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -107,7 +107,7 @@ bool StepArray::gotoNextPoint() {
 
 void StepArray::insertPoints(Common::Point **points, int pointsCount) {
 	if (_currPointIndex + pointsCount >= _pointsCount)
-		realloc(_points, sizeof(Common::Point *) * (_currPointIndex + pointsCount));
+		_points = (Common::Point **)realloc(_points, sizeof(Common::Point *) * (_currPointIndex + pointsCount));
 
 	_maxPointIndex = _currPointIndex + pointsCount;
 






More information about the Scummvm-git-logs mailing list