From f110c097a28c71a66854abfd842aa37a071188ec Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Tue, 21 Mar 2023 23:23:00 +0100 Subject: [PATCH] (Windows) Fixed a regression that made .bat and .lnk files with some special characters impossible to launch --- es-app/src/FileData.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/es-app/src/FileData.cpp b/es-app/src/FileData.cpp index c100adc85..5f581325a 100644 --- a/es-app/src/FileData.cpp +++ b/es-app/src/FileData.cpp @@ -1389,7 +1389,8 @@ void FileData::launchGame() std::string specialCharacters {"^&()=;,"}; for (size_t i {0}; i < specialCharacters.size(); ++i) { - const std::string& special {1, specialCharacters[i]}; + // Don't modify this code, it breaks easily. + const std::string special(1, specialCharacters[i]); if (romPath.find(special) != std::string::npos) { romPath = Utils::String::replace(romPath, special, "^" + special); foundSpecial = true;