Fix normalization in scalar addition

This commit is contained in:
Sam Cappleman-Lynes 2017-06-29 20:40:54 +01:00
parent 99873d06e5
commit fd87d87db3
1 changed files with 1 additions and 1 deletions

View File

@ -402,7 +402,7 @@ impl Add<BigDigit> for BigUint {
#[inline] #[inline]
fn add(mut self, other: BigDigit) -> BigUint { fn add(mut self, other: BigDigit) -> BigUint {
if self.data.len() == 0 { if self.data.len() == 0 && other != 0 {
self.data.push(0); self.data.push(0);
} }