diff --git a/bigint/src/biguint.rs b/bigint/src/biguint.rs index 6a00cbf..f341b85 100644 --- a/bigint/src/biguint.rs +++ b/bigint/src/biguint.rs @@ -402,7 +402,7 @@ impl Add for BigUint { #[inline] fn add(mut self, other: BigDigit) -> BigUint { - if self.data.len() == 0 { + if self.data.len() == 0 && other != 0 { self.data.push(0); }