diff --git a/src/osu/pp.rs b/src/osu/pp.rs index b8f456d6..46a44ef9 100644 --- a/src/osu/pp.rs +++ b/src/osu/pp.rs @@ -737,7 +737,9 @@ fn calculate_effective_misses(attrs: &OsuDifficultyAttributes, state: &OsuScoreS } fn accuracy(n300: usize, n100: usize, n50: usize, n_misses: usize) -> f64 { - debug_assert_ne!(n300 + n100 + n50 + n_misses, 0); + if n300 + n100 + n50 + n_misses == 0 { + return 0.0; + } let numerator = 6 * n300 + 2 * n100 + n50; let denominator = 6 * (n300 + n100 + n50 + n_misses); diff --git a/src/taiko/pp.rs b/src/taiko/pp.rs index cd4f822a..017cc77c 100644 --- a/src/taiko/pp.rs +++ b/src/taiko/pp.rs @@ -472,7 +472,9 @@ impl<'map> From> for TaikoPP<'map> { } fn accuracy(n300: usize, n100: usize, n_misses: usize) -> f64 { - debug_assert_ne!(n300 + n100 + n_misses, 0); + if n300 + n100 + n_misses == 0 { + return 0.0; + } let numerator = 2 * n300 + n100; let denominator = 2 * (n300 + n100 + n_misses);