From c7d24407ee67b90f2dba45289becb2da4576fc0e Mon Sep 17 00:00:00 2001 From: KentuckyCompass Date: Mon, 7 Sep 2015 18:56:18 -0700 Subject: [PATCH] tests show PSP doesn't tolerate extra /s at the end in an ISO --- Core/FileSystems/ISOFileSystem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/FileSystems/ISOFileSystem.cpp b/Core/FileSystems/ISOFileSystem.cpp index 186311cf96..0ff52440bf 100644 --- a/Core/FileSystems/ISOFileSystem.cpp +++ b/Core/FileSystems/ISOFileSystem.cpp @@ -336,7 +336,7 @@ ISOFileSystem::TreeEntry *ISOFileSystem::GetFromPath(const std::string &path, bo size_t nextSlashIndex = path.find_first_of('/', pathIndex); if (nextSlashIndex == std::string::npos) nextSlashIndex = pathLength; - + const std::string firstPathComponent = path.substr(pathIndex, nextSlashIndex - pathIndex); auto child = e->fastChildren.find(firstPathComponent); if (child != e->fastChildren.end()) { @@ -350,7 +350,7 @@ ISOFileSystem::TreeEntry *ISOFileSystem::GetFromPath(const std::string &path, bo { e = ne; pathIndex += name.length(); - while (pathIndex < pathLength && path[pathIndex] == '/') + if (pathIndex < pathLength && path[pathIndex] == '/') ++pathIndex; if (pathLength <= pathIndex)