From fa33de88dbe591802249d89242179dbe9fbecd46 Mon Sep 17 00:00:00 2001 From: Adam Wick Date: Mon, 2 Apr 2018 15:23:38 -0400 Subject: [PATCH] Fix subtraction. --- src/cryptonum/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cryptonum/mod.rs b/src/cryptonum/mod.rs index 296564d..fc2521d 100644 --- a/src/cryptonum/mod.rs +++ b/src/cryptonum/mod.rs @@ -499,7 +499,7 @@ impl<'a> SubAssign<&'a UCN> for UCN { borrow = 0; } else { let x128 = (*x as u128) + 0x10000000000000000; - let res = x128 - (*y as u128); + let res = x128 - (*y as u128) - (borrow as u128); *x = res as u64; borrow = 1; }