diff options
| author | 2023-06-15 23:05:41 -0400 | |
|---|---|---|
| committer | 2023-06-15 23:05:41 -0400 | |
| commit | 8d8f850bd6d32e3f7b0cbbf40d771d49f6f22b1a (patch) | |
| tree | b0d0587e7b4c6d2c74f81f200af21d3e90b4cae3 | |
| parent | nx_tzdb: Correct Antarctica spelling (diff) | |
| download | yuzu-8d8f850bd6d32e3f7b0cbbf40d771d49f6f22b1a.tar.gz yuzu-8d8f850bd6d32e3f7b0cbbf40d771d49f6f22b1a.tar.xz yuzu-8d8f850bd6d32e3f7b0cbbf40d771d49f6f22b1a.zip | |
time_zone_manager: Compare to the correct boolean
Reference implementation does not compare the booleans as we had them.
Use the correct ones as in the reference.
Also adds an assert. I have been made aware of a crash here and am
not able to reproduce currently.
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/service/time/time_zone_manager.cpp | 5 |
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& | |||
| 849 | static Result ToCalendarTimeInternal(const TimeZoneRule& rules, s64 time, | 849 | static Result ToCalendarTimeInternal(const TimeZoneRule& rules, s64 time, |
| 850 | CalendarTimeInternal& calendar_time, | 850 | CalendarTimeInternal& calendar_time, |
| 851 | CalendarAdditionalInfo& calendar_additional_info) { | 851 | CalendarAdditionalInfo& calendar_additional_info) { |
| 852 | if ((rules.go_ahead && time < rules.ats[0]) || | 852 | ASSERT(rules.go_ahead ? rules.time_count > 0 : true); |
| 853 | (rules.go_back && time > rules.ats[rules.time_count - 1])) { | 853 | if ((rules.go_back && time < rules.ats[0]) || |
| 854 | (rules.go_ahead && time > rules.ats[rules.time_count - 1])) { | ||
| 854 | s64 seconds{}; | 855 | s64 seconds{}; |
| 855 | if (time < rules.ats[0]) { | 856 | if (time < rules.ats[0]) { |
| 856 | seconds = rules.ats[0] - time; | 857 | seconds = rules.ats[0] - time; |