[Scummvm-cvs-logs] SF.net SVN: scummvm:[40153] scummvm/trunk/engines/gob/demoplayer.cpp

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Sun Apr 26 21:40:51 CEST 2009


Revision: 40153
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40153&view=rev
Author:   drmccoy
Date:     2009-04-26 19:40:50 +0000 (Sun, 26 Apr 2009)

Log Message:
-----------
Ooops, actually delete[] the correct pointer (yeah, syke, I should have valgrind'd it again ;))

Modified Paths:
--------------
    scummvm/trunk/engines/gob/demoplayer.cpp

Modified: scummvm/trunk/engines/gob/demoplayer.cpp
===================================================================
--- scummvm/trunk/engines/gob/demoplayer.cpp	2009-04-26 15:52:52 UTC (rev 40152)
+++ scummvm/trunk/engines/gob/demoplayer.cpp	2009-04-26 19:40:50 UTC (rev 40153)
@@ -65,9 +65,9 @@
 
 void DemoPlayer::playVideo(const char *fileName) {
 	uint32 waitTime = 0;
-	char *file;
+	char *file, *filePtr;
 
-	file = new char[strlen(fileName) + 1];
+	file = filePtr = new char[strlen(fileName) + 1];
 	strcpy(file, fileName);
 
 	// Trimming spaces front
@@ -103,7 +103,7 @@
 			_vm->_util->longDelay(waitTime);
 	}
 
-	delete[] file;
+	delete[] filePtr;
 }
 
 void DemoPlayer::evaluateVideoMode(const char *mode) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list