diff --git a/math/src/unsigned_integer/element.rs b/math/src/unsigned_integer/element.rs index fea84a98e..d76e54ec7 100644 --- a/math/src/unsigned_integer/element.rs +++ b/math/src/unsigned_integer/element.rs @@ -707,7 +707,7 @@ impl UnsignedInteger { while i > 0 { i -= 1; if NUM_LIMBS - 1 <= i * 2 { - let index = 2 * i - NUM_LIMBS + 1; + let index = 2 * i + 1 - NUM_LIMBS; let cs = lo.limbs[index] as u128 + a.limbs[i] as u128 * a.limbs[i] as u128 + c; c = cs >> 64; lo.limbs[index] = cs as u64;