[Scummvm-cvs-logs] SF.net SVN: scummvm:[35213] scummvm/trunk/engines/drascula/saveload.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Wed Dec 3 09:59:12 CET 2008


Revision: 35213
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35213&view=rev
Author:   thebluegr
Date:     2008-12-03 08:59:12 +0000 (Wed, 03 Dec 2008)

Log Message:
-----------
readLine_OLD -> readLine_NEW

Modified Paths:
--------------
    scummvm/trunk/engines/drascula/saveload.cpp

Modified: scummvm/trunk/engines/drascula/saveload.cpp
===================================================================
--- scummvm/trunk/engines/drascula/saveload.cpp	2008-12-03 08:27:08 UTC (rev 35212)
+++ scummvm/trunk/engines/drascula/saveload.cpp	2008-12-03 08:59:12 UTC (rev 35213)
@@ -49,8 +49,15 @@
 			error("Can't open %s file", fileEpa);
 		}
 	}
-	for (n = 0; n < NUM_SAVES; n++)
-		sav->readLine_OLD(names[n], 23);
+	int l;
+	for (n = 0; n < NUM_SAVES; n++) {
+		sav->readLine_NEW(names[n], 23);
+		// readLine_NEW also returns the newline character (\n),
+		// so we need to clear it here
+		l = strlen(names[n]);
+		if (l > 0 && names[n][l - 1] == '\n')
+			names[n][l - 1] = '\0';
+	}
 	delete sav;
 
 	loadPic("savescr.alg", bgSurface, HALF_PAL);


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