From 8206f39bdc9a186d7c6c574bc467778dc14555d9 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 5 Jan 2023 10:14:37 +1000 Subject: [PATCH] Fix sparse today stats Not safe to assume revlog is ordered by query --- rslib/src/stats/graphs/today.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rslib/src/stats/graphs/today.rs b/rslib/src/stats/graphs/today.rs index d96f2de7b..0b3ba3542 100644 --- a/rslib/src/stats/graphs/today.rs +++ b/rslib/src/stats/graphs/today.rs @@ -11,7 +11,7 @@ impl GraphsContext { let start_of_today_ms = self.next_day_start.adding_secs(-86_400).as_millis().0; for review in self.revlog.iter().rev() { if review.id.0 < start_of_today_ms { - break; + continue; } if review.review_kind == RevlogReviewKind::Manual { continue;