summaryrefslogtreecommitdiffhomepage
path: root/libtommath/bn_mp_add_d.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtommath/bn_mp_add_d.c')
-rw-r--r--libtommath/bn_mp_add_d.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libtommath/bn_mp_add_d.c b/libtommath/bn_mp_add_d.c
index bdd0280..5af5aa9 100644
--- a/libtommath/bn_mp_add_d.c
+++ b/libtommath/bn_mp_add_d.c
@@ -12,7 +12,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
- * Tom St Denis, tomstdenis@iahu.ca, http://math.libtomcrypt.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
*/
/* single digit addition */
@@ -40,6 +40,9 @@ mp_add_d (mp_int * a, mp_digit b, mp_int * c)
/* fix sign */
a->sign = c->sign = MP_NEG;
+ /* clamp */
+ mp_clamp(c);
+
return res;
}
@@ -103,3 +106,7 @@ mp_add_d (mp_int * a, mp_digit b, mp_int * c)
}
#endif
+
+/* $Source: /cvs/libtom/libtommath/bn_mp_add_d.c,v $ */
+/* $Revision: 1.4 $ */
+/* $Date: 2006/03/31 14:18:44 $ */