[Scummvm-cvs-logs] SF.net SVN: scummvm: [21888] scummvm/trunk/base

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Fri Apr 14 07:27:04 CEST 2006


Revision: 21888
Author:   fingolfin
Date:     2006-04-14 07:26:34 -0700 (Fri, 14 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21888&view=rev

Log Message:
-----------
cleanup

Modified Paths:
--------------
    scummvm/trunk/base/engine.cpp
    scummvm/trunk/base/gameDetector.cpp
    scummvm/trunk/base/main.cpp
Modified: scummvm/trunk/base/engine.cpp
===================================================================
--- scummvm/trunk/base/engine.cpp	2006-04-14 13:20:39 UTC (rev 21887)
+++ scummvm/trunk/base/engine.cpp	2006-04-14 14:26:34 UTC (rev 21888)
@@ -193,7 +193,7 @@
 #ifdef __SYMBIAN32__
 	Symbian::FatalError(buf_output);
 #endif
-	// Finally exit. quit() will terminate the program if g_system iss present
+	// Finally exit. quit() will terminate the program if g_system is present
 	if (g_system)
 		g_system->quit();
 

Modified: scummvm/trunk/base/gameDetector.cpp
===================================================================
--- scummvm/trunk/base/gameDetector.cpp	2006-04-14 13:20:39 UTC (rev 21887)
+++ scummvm/trunk/base/gameDetector.cpp	2006-04-14 14:26:34 UTC (rev 21888)
@@ -214,7 +214,7 @@
 #ifdef UNIX
 	struct stat sb;
 	const char *home = getenv("HOME");
-	if (home != NULL && strlen(home) < MAXPATHLEN) {
+	if (home && *home && strlen(home) < MAXPATHLEN) {
 		snprintf(savePath, MAXPATHLEN, "%s/%s", home, DEFAULT_SAVE_PATH);
 		if (stat(savePath, &sb) == -1) {
 			/* create the dir if it does not exist */
@@ -559,7 +559,7 @@
 #if !defined(MACOS_CARBON) && !defined(_WIN32_WCE) && !defined(PALMOS_MODE) && !defined(__GP32__)
 	if (!settings.contains("savepath")) {
 		const char *dir = getenv("SCUMMVM_SAVEPATH");
-		if (dir && *dir && strlen(dir) < 1024) {
+		if (dir && *dir && strlen(dir) < MAXPATHLEN) {
 			// TODO: Verify whether the path is valid
 			settings["savepath"] = dir;
 		}

Modified: scummvm/trunk/base/main.cpp
===================================================================
--- scummvm/trunk/base/main.cpp	2006-04-14 13:20:39 UTC (rev 21887)
+++ scummvm/trunk/base/main.cpp	2006-04-14 14:26:34 UTC (rev 21888)
@@ -279,10 +279,10 @@
 	// inside parseCommandLine. This should be unified.
 	if (command == "list-targets") {
 		listTargets();
-		exit(0);
+		return 0;
 	} else if (command == "list-games") {
 		listGames();
-		exit(0);
+		return 0;
 	}
 	
 


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