Merge pull request #6220 from leoetlino/utf8

WX: Fix argument parsing
This commit is contained in:
Pierre Bourdon 2017-12-07 15:16:39 +01:00 committed by GitHub
commit 8a830074b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 43 additions and 14 deletions

View file

@ -157,8 +157,9 @@ static ConfigLocation MapINIToRealLocation(const std::string& section, const std
std::getline(buffer, config_section, '.');
fail |= buffer.fail();
if (!fail)
return {Config::GetSystemFromName(system_str), config_section, key};
const std::optional<Config::System> system = Config::GetSystemFromName(system_str);
if (!fail && system)
return {*system, config_section, key};
WARN_LOG(CORE, "Unknown game INI option in section %s: %s", section.c_str(), key.c_str());
return {Config::System::Main, "", ""};