[Scummvm-cvs-logs] SF.net SVN: scummvm:[41545] tools/branches/gsoc2009-gui

Remere at users.sourceforge.net Remere at users.sourceforge.net
Mon Jun 15 15:49:39 CEST 2009


Revision: 41545
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41545&view=rev
Author:   Remere
Date:     2009-06-15 13:49:39 +0000 (Mon, 15 Jun 2009)

Log Message:
-----------
*Fixed Filename::getPath returning faulty paths for paths not containing '/'.
*Fixed extract_gob_stk adding the extension .stk, instead of changing it to .stk

Modified Paths:
--------------
    tools/branches/gsoc2009-gui/extract_gob_stk.cpp
    tools/branches/gsoc2009-gui/util.cpp

Modified: tools/branches/gsoc2009-gui/extract_gob_stk.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_gob_stk.cpp	2009-06-15 13:23:26 UTC (rev 41544)
+++ tools/branches/gsoc2009-gui/extract_gob_stk.cpp	2009-06-15 13:49:39 UTC (rev 41545)
@@ -78,9 +78,10 @@
 	if (!(stk = fopen(inpath.getFullPath(), "rb")))
 		error("Couldn't open file \"%s\"", inpath.getFullPath());
 
-	if (inpath.empty())
+	if (outpath.empty()) {
 		outpath = inpath;
-	outpath.addExtension(".gob");
+		outpath.setExtension(".gob");
+	}
 
 	if (!(gobConf = fopen(outpath.getFullPath(), "w")))
 		error("Couldn't create config file \"%s\"", outpath.getFullPath());

Modified: tools/branches/gsoc2009-gui/util.cpp
===================================================================
--- tools/branches/gsoc2009-gui/util.cpp	2009-06-15 13:23:26 UTC (rev 41544)
+++ tools/branches/gsoc2009-gui/util.cpp	2009-06-15 13:49:39 UTC (rev 41545)
@@ -255,11 +255,11 @@
 	if ((slash = strrchr(_path, '/')) || (slash = strrchr(_path, '\\'))) {
 		int end = strlen(_path) - strlen(slash) + 1;
 		strncpy(out, _path, end);
-		out[end] = 0;
+		out[end] = '\0';
 		return out;
 	}
-	// If there was no '/', this was a relative path
-	strcpy(out, _path);
+	// If there was no '/', this was a local path
+	out[0] = '\0';
 	return out;
 }
 


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