mirror of
https://github.com/ankitects/anki.git
synced 2025-12-10 21:36:55 -05:00
Fix a panic when user sets a huge learning step
This commit is contained in:
parent
7ff75ca936
commit
3999c99af7
1 changed files with 1 additions and 1 deletions
|
|
@ -66,7 +66,7 @@ impl<'a> LearningSteps<'a> {
|
||||||
// 50% more than the again secs, but at most one day more
|
// 50% more than the again secs, but at most one day more
|
||||||
// otherwise, a learning step of 3 days and a graduating interval of 4 days e.g.
|
// otherwise, a learning step of 3 days and a graduating interval of 4 days e.g.
|
||||||
// would lead to the hard interval being larger than the good interval
|
// would lead to the hard interval being larger than the good interval
|
||||||
let secs = (again_secs.saturating_mul(3) / 2).min(again_secs + DAY);
|
let secs = (again_secs.saturating_mul(3) / 2).min(again_secs.saturating_add(DAY));
|
||||||
maybe_round_in_days(secs)
|
maybe_round_in_days(secs)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue