summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2023-06-16 05:05:41 +0200
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2023-06-16 05:05:41 +0200
commit8d8f850bd6d32e3f7b0cbbf40d771d49f6f22b1a (patch)
treeb0d0587e7b4c6d2c74f81f200af21d3e90b4cae3 /src
parentnx_tzdb: Correct Antarctica spelling (diff)
downloadyuzu-8d8f850bd6d32e3f7b0cbbf40d771d49f6f22b1a.tar
yuzu-8d8f850bd6d32e3f7b0cbbf40d771d49f6f22b1a.tar.gz
yuzu-8d8f850bd6d32e3f7b0cbbf40d771d49f6f22b1a.tar.bz2
yuzu-8d8f850bd6d32e3f7b0cbbf40d771d49f6f22b1a.tar.lz
yuzu-8d8f850bd6d32e3f7b0cbbf40d771d49f6f22b1a.tar.xz
yuzu-8d8f850bd6d32e3f7b0cbbf40d771d49f6f22b1a.tar.zst
yuzu-8d8f850bd6d32e3f7b0cbbf40d771d49f6f22b1a.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/time/time_zone_manager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/service/time/time_zone_manager.cpp b/src/core/hle/service/time/time_zone_manager.cpp
index e1728c06d..63aacd19f 100644
--- a/src/core/hle/service/time/time_zone_manager.cpp
+++ b/src/core/hle/service/time/time_zone_manager.cpp
@@ -849,8 +849,9 @@ static Result CreateCalendarTime(s64 time, int gmt_offset, CalendarTimeInternal&
static Result ToCalendarTimeInternal(const TimeZoneRule& rules, s64 time,
CalendarTimeInternal& calendar_time,
CalendarAdditionalInfo& calendar_additional_info) {
- if ((rules.go_ahead && time < rules.ats[0]) ||
- (rules.go_back && time > rules.ats[rules.time_count - 1])) {
+ ASSERT(rules.go_ahead ? rules.time_count > 0 : true);
+ if ((rules.go_back && time < rules.ats[0]) ||
+ (rules.go_ahead && time > rules.ats[rules.time_count - 1])) {
s64 seconds{};
if (time < rules.ats[0]) {
seconds = rules.ats[0] - time;