diff options
author | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-06-20 21:49:47 +0200 |
---|---|---|
committer | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-06-20 21:54:05 +0200 |
commit | fd5d7947f614d837cb3b08e132a025c4e1536d37 (patch) | |
tree | 682ddeaf8d3097e35aa7ff0ec70345df5577d185 /src/core | |
parent | Merge pull request #10853 from lat9nq/update_tzdb_to_nx (diff) | |
download | yuzu-fd5d7947f614d837cb3b08e132a025c4e1536d37.tar yuzu-fd5d7947f614d837cb3b08e132a025c4e1536d37.tar.gz yuzu-fd5d7947f614d837cb3b08e132a025c4e1536d37.tar.bz2 yuzu-fd5d7947f614d837cb3b08e132a025c4e1536d37.tar.lz yuzu-fd5d7947f614d837cb3b08e132a025c4e1536d37.tar.xz yuzu-fd5d7947f614d837cb3b08e132a025c4e1536d37.tar.zst yuzu-fd5d7947f614d837cb3b08e132a025c4e1536d37.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/hle/service/time/time_zone_manager.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/hle/service/time/time_zone_manager.cpp b/src/core/hle/service/time/time_zone_manager.cpp index 63aacd19f..43d0a19b8 100644 --- a/src/core/hle/service/time/time_zone_manager.cpp +++ b/src/core/hle/service/time/time_zone_manager.cpp @@ -911,7 +911,9 @@ static Result ToCalendarTimeInternal(const TimeZoneRule& rules, s64 time, calendar_additional_info.is_dst = rules.ttis[tti_index].is_dst; const char* time_zone{&rules.chars[rules.ttis[tti_index].abbreviation_list_index]}; - for (int index{}; time_zone[index] != '\0'; ++index) { + for (u32 index{}; time_zone[index] != '\0' && time_zone[index] != ',' && + index < calendar_additional_info.timezone_name.size() - 1; + ++index) { calendar_additional_info.timezone_name[index] = time_zone[index]; } return ResultSuccess; |