mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Fixed an issue where quotation marks in the launch command were not always handled correctly when combined with the %CORE% variable
This commit is contained in:
parent
ff6fa413f5
commit
556646aaf5
|
@ -1192,7 +1192,7 @@ void FileData::launchGame()
|
||||||
coreFilePos = command.find("%", coreEntryPos + 6);
|
coreFilePos = command.find("%", coreEntryPos + 6);
|
||||||
|
|
||||||
size_t separatorPos;
|
size_t separatorPos;
|
||||||
size_t quotePos {command.find("\"", coreFilePos)};
|
size_t quotePos {hasCoreQuotation ? command.find("\"", coreFilePos) : std::string::npos};
|
||||||
if (quotePos == std::string::npos)
|
if (quotePos == std::string::npos)
|
||||||
separatorPos = command.find(" ", coreFilePos);
|
separatorPos = command.find(" ", coreFilePos);
|
||||||
else
|
else
|
||||||
|
@ -1237,11 +1237,6 @@ void FileData::launchGame()
|
||||||
coreFile = Utils::FileSystem::getEscapedPath(coreFile);
|
coreFile = Utils::FileSystem::getEscapedPath(coreFile);
|
||||||
command.replace(coreEntryPos,
|
command.replace(coreEntryPos,
|
||||||
separatorPos - coreEntryPos + (hasCoreQuotation ? 1 : 0), coreFile);
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue