[Scummvm-git-logs] scummvm branch-2-2 -> 3eb363ed7ffbda1b0506491633b4a0ae1ccc0652

mduggan mgithub at guarana.org
Tue Oct 20 12:36:58 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
3eb363ed7f ULTIMA8: Avoid trying to make empty path name


Commit: 3eb363ed7ffbda1b0506491633b4a0ae1ccc0652
    https://github.com/scummvm/scummvm/commit/3eb363ed7ffbda1b0506491633b4a0ae1ccc0652
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2020-10-20T21:36:50+09:00

Commit Message:
ULTIMA8: Avoid trying to make empty path name

This has no impact on most platforms, but it breaks Android.

Changed paths:
    engines/ultima/ultima8/filesys/file_system.cpp


diff --git a/engines/ultima/ultima8/filesys/file_system.cpp b/engines/ultima/ultima8/filesys/file_system.cpp
index b2c143c84c..1992010c52 100644
--- a/engines/ultima/ultima8/filesys/file_system.cpp
+++ b/engines/ultima/ultima8/filesys/file_system.cpp
@@ -220,7 +220,7 @@ bool FileSystem::AddVirtualPath(const string &vpath, const string &realpath, con
 #ifdef DEBUG
 	debugN(MM_INFO, "virtual path \"%s\": %s\n", vp.c_str(), fullpath.c_str());
 #endif
-	if (!(fullpath.substr(0, 8) == "@memory/")) {
+	if (!(fullpath.substr(0, 8) == "@memory/") && rp.length()) {
 		if (!IsDir(fullpath)) {
 			if (!create) {
 #ifdef DEBUG
@@ -271,7 +271,7 @@ bool FileSystem::rewrite_virtual_path(string &vfn) const {
 	string::size_type pos = vfn.size();
 
 	while ((pos = vfn.rfind('/', pos)) != Std::string::npos) {
-//		perr << vfn << ", " << vfn.substr(0, pos) << ", " << pos << Std::endl;
+//		perr << vfn << ", '" << vfn.substr(0, pos) << "', " << pos << Std::endl;
 		Std::map<Common::String, string>::const_iterator p = _virtualPaths.find(
 		            vfn.substr(0, pos));
 




More information about the Scummvm-git-logs mailing list