Merge pull request #8542 from Itrimel/fix-gecko-loading

Fix Gecko codes loading
This commit is contained in:
JosJuice 2020-02-15 16:28:32 +01:00 committed by GitHub
commit 62046d93ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -85,6 +85,11 @@ std::vector<GeckoCode> DownloadCodes(std::string gametdb_id, bool* succeeded)
{
std::istringstream ssline(line);
std::string addr, data;
// Some locales (e.g. fr_FR.UTF-8) don't split the string stream on space
// Use the C locale to workaround this behavior
ssline.imbue(std::locale::classic());
ssline >> addr >> data;
ssline.seekg(0);
@ -139,6 +144,10 @@ std::vector<GeckoCode> LoadCodes(const IniFile& globalIni, const IniFile& localI
{
std::istringstream ss(line);
// Some locales (e.g. fr_FR.UTF-8) don't split the string stream on space
// Use the C locale to workaround this behavior
ss.imbue(std::locale::classic());
switch ((line)[0])
{
// enabled or disabled code