diff options
| author | 2016-02-29 23:56:02 -0800 | |
|---|---|---|
| committer | 2016-02-29 23:56:02 -0800 | |
| commit | 1912c4691b65e11aac3b70e0db63118517576706 (patch) | |
| tree | de3d88c1ee09fdc7e707b7f05bdc352fb114a331 | |
| parent | Service/CFG: Add block 0x000A0000 (username) to default config file (diff) | |
| download | yuzu-1912c4691b65e11aac3b70e0db63118517576706.tar.gz yuzu-1912c4691b65e11aac3b70e0db63118517576706.tar.xz yuzu-1912c4691b65e11aac3b70e0db63118517576706.zip | |
Service/CFG: Fix potential endianess issue
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/service/cfg/cfg.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/service/cfg/cfg.cpp b/src/core/hle/service/cfg/cfg.cpp index 4bf0d446b..4c82a58e4 100644 --- a/src/core/hle/service/cfg/cfg.cpp +++ b/src/core/hle/service/cfg/cfg.cpp | |||
| @@ -357,9 +357,10 @@ ResultCode FormatConfig() { | |||
| 357 | res = CreateConfigInfoBlk(0x000B0000, sizeof(COUNTRY_INFO), 0xE, &COUNTRY_INFO); | 357 | res = CreateConfigInfoBlk(0x000B0000, sizeof(COUNTRY_INFO), 0xE, &COUNTRY_INFO); |
| 358 | if (!res.IsSuccess()) return res; | 358 | if (!res.IsSuccess()) return res; |
| 359 | 359 | ||
| 360 | char16_t country_name_buffer[16][0x40] = {}; | 360 | u16_le country_name_buffer[16][0x40] = {}; |
| 361 | std::u16string region_name = Common::UTF8ToUTF16("Gensokyo"); | ||
| 361 | for (size_t i = 0; i < 16; ++i) { | 362 | for (size_t i = 0; i < 16; ++i) { |
| 362 | Common::UTF8ToUTF16("Gensokyo").copy(country_name_buffer[i], 0x40); | 363 | std::copy(region_name.cbegin(), region_name.cend(), country_name_buffer[i]); |
| 363 | } | 364 | } |
| 364 | // 0x000B0001 - Localized names for the profile Country | 365 | // 0x000B0001 - Localized names for the profile Country |
| 365 | res = CreateConfigInfoBlk(0x000B0001, sizeof(country_name_buffer), 0xE, country_name_buffer); | 366 | res = CreateConfigInfoBlk(0x000B0001, sizeof(country_name_buffer), 0xE, country_name_buffer); |