From 3713c86373bd57ba15aefd40a0c35b6378f63948 Mon Sep 17 00:00:00 2001 From: Jarrett Ye Date: Sun, 26 Nov 2023 11:14:31 +0800 Subject: [PATCH] don't convert from sm2 when ivl = 0 (#2849) --- rslib/src/scheduler/fsrs/memory_state.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rslib/src/scheduler/fsrs/memory_state.rs b/rslib/src/scheduler/fsrs/memory_state.rs index f22d8c5a3..dc2fc54f4 100644 --- a/rslib/src/scheduler/fsrs/memory_state.rs +++ b/rslib/src/scheduler/fsrs/memory_state.rs @@ -160,7 +160,7 @@ impl Card { self.memory_state = item .map(|i| fsrs.memory_state(i.item, i.starting_state)) .or_else(|| { - if self.ctype == CardType::New { + if self.ctype == CardType::New || self.interval == 0 { None } else { // no valid revlog entries; infer state from current card state