[Scummvm-cvs-logs] SF.net SVN: scummvm:[54885] scummvm/trunk/engines/mohawk/livingbooks.cpp

fuzzie at users.sourceforge.net fuzzie at users.sourceforge.net
Sun Dec 12 20:00:54 CET 2010


Revision: 54885
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54885&view=rev
Author:   fuzzie
Date:     2010-12-12 19:00:53 +0000 (Sun, 12 Dec 2010)

Log Message:
-----------
MOHAWK: Skip CD-ROM titles in LB paths

Modified Paths:
--------------
    scummvm/trunk/engines/mohawk/livingbooks.cpp

Modified: scummvm/trunk/engines/mohawk/livingbooks.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/livingbooks.cpp	2010-12-12 18:55:27 UTC (rev 54884)
+++ scummvm/trunk/engines/mohawk/livingbooks.cpp	2010-12-12 19:00:53 UTC (rev 54885)
@@ -623,7 +623,15 @@
 Common::String MohawkEngine_LivingBooks::convertWinFileName(const Common::String &string) {
 	Common::String filename;
 
-	for (uint32 i = 0; i < string.size(); i++) {
+	uint32 i = 0;
+	if (string.hasPrefix("//")) {
+		// skip "//CD-ROM Title/" prefixes which we don't care about
+		i = 3;
+		while (i < string.size() && string[i - 1] != '/')
+			i++;
+	}
+
+	for (; i < string.size(); i++) {
 		if (string[i] == '\\')
 			filename += '/';
 		else


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