Fix #12648: Ensure all uses of std::filesystem::path use native encoding. (#12650)

std::filesystem::path does not expect UTF-8 strings, so they must be converted to native format first (and back to utf-8 after.)
This commit is contained in:
Peter Nelson
2024-06-09 10:23:47 +01:00
committed by GitHub
parent fce9361bf2
commit b4b2fad8e0
6 changed files with 14 additions and 14 deletions

View File

@@ -386,7 +386,7 @@ void ReconsiderGameScriptLanguage()
{
if (_current_data == nullptr) return;
std::string language = _current_language->file.stem().string();
std::string language = FS2OTTD(_current_language->file.stem());
for (auto &p : _current_data->compiled_strings) {
if (p.language == language) {
_current_data->cur_language = &p;