Skip to content
Snippets Groups Projects
Commit 50381bd4 authored by Bretagne Antonin's avatar Bretagne Antonin
Browse files

Fix: panic in to_polynomials

parent 785b06ab
No related merge requests found
......@@ -230,7 +230,11 @@ pub fn to_polynomial<F: FftField>(mut evaluations: Vec<F>, degree_bound: usize)
domain.ifft_in_place(&mut evaluations);
debug_assert!(
evaluations[degree_bound..].iter().all(|c| *c == F::ZERO),
evaluations
.get(degree_bound..)
.unwrap_or_default()
.iter()
.all(|c| *c == F::ZERO),
"Degree of polynomial is not bound by {degree_bound}"
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment