Fix normalization in scalar addition
This commit is contained in:
parent
99873d06e5
commit
fd87d87db3
|
@ -402,7 +402,7 @@ impl Add<BigDigit> 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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue