From bc232053a7f9dbae2a6fc42fc334134edac6ea7b Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 10 Jul 2021 18:36:07 +0100 Subject: [PATCH] zccord: Fix a panic in some iteration cases Signed-off-by: Ian Jackson --- base/zcoord.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/zcoord.rs b/base/zcoord.rs index a7a5fb31..9ab03683 100644 --- a/base/zcoord.rs +++ b/base/zcoord.rs @@ -369,7 +369,7 @@ impl Mutable { *self.limbs.get(i).unwrap_or(&ZERO) } fn extend_to_limb(&mut self, i: usize) { - if self.limbs.len() < i { + if self.limbs.len() <= i { self.limbs.resize(i+1, ZERO); } } -- 2.30.2