fix bug in rev ivl adjustment that could lead to 0 day interval

This commit is contained in:
Damien Elmes 2011-12-01 17:35:26 +09:00
parent 320bb7c82f
commit 4a3b190453

View file

@ -611,7 +611,7 @@ did in %s and queue = 2 and due <= :lim %s limit %d""" % (
# loop through possible due dates for an empty one
for diff in range(1, leeway+1):
# ensure we're due at least tomorrow
if idealDue - diff >= 1 and (idealDue - diff) not in dues:
if idealIvl - diff >= 1 and (idealDue - diff) not in dues:
fudge = -diff
break
elif (idealDue + diff) not in dues:
@ -748,9 +748,6 @@ your short-term review workload will become."""))
elif ease == 3:
# early removal
return self._graduatingIvl(card, conf, True) * 86400
else:
if card.queue == 0:
left = self._startingLeft(card) - 1
else:
left = card.left - 1
if left <= 0: