[Scummvm-cvs-logs] scummvm master -> 0de198c9972ea39be93b48bd49e98bf499edc441

DrMcCoy drmccoy at drmccoy.de
Wed Mar 20 08:37:33 CET 2013


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

Summary:
19d9071841 GOB: iterator++ -> ++iterator
0de198c997 GOB: Plug a leak


Commit: 19d90718413ba2d725bb2cce9e62cc532516f459
    https://github.com/scummvm/scummvm/commit/19d90718413ba2d725bb2cce9e62cc532516f459
Author: Sven Hesse (drmccoy at users.sourceforge.net)
Date: 2013-03-20T00:27:51-07:00

Commit Message:
GOB: iterator++ -> ++iterator

Changed paths:
    engines/gob/anifile.cpp



diff --git a/engines/gob/anifile.cpp b/engines/gob/anifile.cpp
index 085ac80..3b6a7f6 100644
--- a/engines/gob/anifile.cpp
+++ b/engines/gob/anifile.cpp
@@ -159,7 +159,7 @@ void ANIFile::loadAnimation(Animation &animation, FrameArray &frames,
 		area.left  = area.top    =  0x7FFF;
 		area.right = area.bottom = -0x7FFF;
 
-		for (ChunkList::const_iterator c = frame.begin(); c != frame.end(); c++) {
+		for (ChunkList::const_iterator c = frame.begin(); c != frame.end(); ++c) {
 			uint16 cL, cT, cR, cB;
 
 			if (!getCoordinates(c->layer, c->part, cL, cT, cR, cB))


Commit: 0de198c9972ea39be93b48bd49e98bf499edc441
    https://github.com/scummvm/scummvm/commit/0de198c9972ea39be93b48bd49e98bf499edc441
Author: Sven Hesse (drmccoy at users.sourceforge.net)
Date: 2013-03-20T00:28:45-07:00

Commit Message:
GOB: Plug a leak

Changed paths:
    engines/gob/cmpfile.cpp



diff --git a/engines/gob/cmpfile.cpp b/engines/gob/cmpfile.cpp
index d304958..0c650a9 100644
--- a/engines/gob/cmpfile.cpp
+++ b/engines/gob/cmpfile.cpp
@@ -135,8 +135,11 @@ void CMPFile::loadCMP(Common::SeekableReadStream &cmp) {
 	uint32 size = cmp.size();
 	byte  *data = new byte[size];
 
-	if (cmp.read(data, size) != size)
+	if (cmp.read(data, size) != size) {
+		delete[] data;
+
 		return;
+	}
 
 	_vm->_video->drawPackedSprite(data, _surface->getWidth(), _surface->getHeight(), 0, 0, 0, *_surface);
 






More information about the Scummvm-git-logs mailing list