From 556646aaf59d90ff3e0679a7b8023d9a450c6edf Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 8 Oct 2023 21:02:14 +0200 Subject: [PATCH] Fixed an issue where quotation marks in the launch command were not always handled correctly when combined with the %CORE% variable --- es-app/src/FileData.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/es-app/src/FileData.cpp b/es-app/src/FileData.cpp index 29c8e5ee8..e8fe09ef1 100644 --- a/es-app/src/FileData.cpp +++ b/es-app/src/FileData.cpp @@ -1192,7 +1192,7 @@ void FileData::launchGame() coreFilePos = command.find("%", coreEntryPos + 6); size_t separatorPos; - size_t quotePos {command.find("\"", coreFilePos)}; + size_t quotePos {hasCoreQuotation ? command.find("\"", coreFilePos) : std::string::npos}; if (quotePos == std::string::npos) separatorPos = command.find(" ", coreFilePos); else @@ -1237,11 +1237,6 @@ void FileData::launchGame() coreFile = Utils::FileSystem::getEscapedPath(coreFile); command.replace(coreEntryPos, separatorPos - coreEntryPos + (hasCoreQuotation ? 1 : 0), coreFile); -#if !defined(_WIN64) - // Remove any quotation marks as it would make the launch function fail. - if (command.find("\"") != std::string::npos) - command = Utils::String::replace(command, "\"", ""); -#endif break; } }