diff options
Diffstat (limited to 'libtommath/bn_mp_sub_d.c')
-rw-r--r-- | libtommath/bn_mp_sub_d.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libtommath/bn_mp_sub_d.c b/libtommath/bn_mp_sub_d.c index 4923dde..ee77a5a 100644 --- a/libtommath/bn_mp_sub_d.c +++ b/libtommath/bn_mp_sub_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 subtraction */ @@ -36,6 +36,10 @@ mp_sub_d (mp_int * a, mp_digit b, mp_int * c) a->sign = MP_ZPOS; res = mp_add_d(a, b, c); a->sign = c->sign = MP_NEG; + + /* clamp */ + mp_clamp(c); + return res; } @@ -83,3 +87,7 @@ mp_sub_d (mp_int * a, mp_digit b, mp_int * c) } #endif + +/* $Source: /cvs/libtom/libtommath/bn_mp_sub_d.c,v $ */ +/* $Revision: 1.5 $ */ +/* $Date: 2006/03/31 14:18:44 $ */ |