From f246cf1062c9c4ff85e3b5df0bf86ef68b812f18 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 25 Sep 2018 09:55:46 +1000 Subject: [PATCH] strictly enforce maxIvl https://anki.tenderapp.com/discussions/ankidesktop/29904-bug-in-v2-scheduler-that-allows-exceeding-the-maximum-review-interval --- anki/schedv2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anki/schedv2.py b/anki/schedv2.py index c89fbd574..e647beb18 100644 --- a/anki/schedv2.py +++ b/anki/schedv2.py @@ -943,8 +943,8 @@ select id from cards where did in %s and queue = 2 and due <= ? limit ?)""" ivl = int(ivl * conf.get('ivlFct', 1)) if fuzz: ivl = self._fuzzedIvl(ivl) - ivl = min(ivl, conf['maxIvl']) ivl = max(ivl, prev+1, 1) + ivl = min(ivl, conf['maxIvl']) return int(ivl) def _daysLate(self, card):