mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
fix a panic when browser encounters a filtered card outside filtered deck
the -99999 due date overflows the i32, yielding to a stuck interface when running in a debug build
This commit is contained in:
parent
f91f00a542
commit
52676f1555
1 changed files with 3 additions and 4 deletions
|
@ -104,10 +104,9 @@ impl Card {
|
||||||
if self.queue == CardQueue::Learn {
|
if self.queue == CardQueue::Learn {
|
||||||
Some(TimestampSecs(self.due as i64))
|
Some(TimestampSecs(self.due as i64))
|
||||||
} else if self.is_due_in_days() {
|
} else if self.is_due_in_days() {
|
||||||
Some(
|
Some(TimestampSecs::now().adding_secs(
|
||||||
TimestampSecs::now()
|
((self.due - timing.days_elapsed as i32).saturating_mul(86400)) as i64,
|
||||||
.adding_secs(((self.due - timing.days_elapsed as i32) * 86400) as i64),
|
))
|
||||||
)
|
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue