mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-12-23 16:25:39 +00:00
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.
This commit is contained in:
parent
03e8d9aca7
commit
8d8f850bd6
|
@ -849,8 +849,9 @@ static Result CreateCalendarTime(s64 time, int gmt_offset, CalendarTimeInternal&
|
||||||
static Result ToCalendarTimeInternal(const TimeZoneRule& rules, s64 time,
|
static Result ToCalendarTimeInternal(const TimeZoneRule& rules, s64 time,
|
||||||
CalendarTimeInternal& calendar_time,
|
CalendarTimeInternal& calendar_time,
|
||||||
CalendarAdditionalInfo& calendar_additional_info) {
|
CalendarAdditionalInfo& calendar_additional_info) {
|
||||||
if ((rules.go_ahead && time < rules.ats[0]) ||
|
ASSERT(rules.go_ahead ? rules.time_count > 0 : true);
|
||||||
(rules.go_back && time > rules.ats[rules.time_count - 1])) {
|
if ((rules.go_back && time < rules.ats[0]) ||
|
||||||
|
(rules.go_ahead && time > rules.ats[rules.time_count - 1])) {
|
||||||
s64 seconds{};
|
s64 seconds{};
|
||||||
if (time < rules.ats[0]) {
|
if (time < rules.ats[0]) {
|
||||||
seconds = rules.ats[0] - time;
|
seconds = rules.ats[0] - time;
|
||||||
|
|
Loading…
Reference in a new issue