summaryrefslogtreecommitdiffstats
path: root/libtommath/bn_mp_sub_d.c
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2005-12-27 17:59:37 (GMT)
committerKevin B Kenny <kennykb@acm.org>2005-12-27 17:59:37 (GMT)
commit98036f8f9d6591f75cbbb744ae789e53250d2459 (patch)
tree3273c8ec1192254a0628eccc71a9b1088fea0f2a /libtommath/bn_mp_sub_d.c
parentfe06c63182af8cb6b22df8c3cf9c7670c92c320d (diff)
downloadtcl-98036f8f9d6591f75cbbb744ae789e53250d2459.zip
tcl-98036f8f9d6591f75cbbb744ae789e53250d2459.tar.gz
tcl-98036f8f9d6591f75cbbb744ae789e53250d2459.tar.bz2
Import of libtommath 0.37
Diffstat (limited to 'libtommath/bn_mp_sub_d.c')
-rw-r--r--libtommath/bn_mp_sub_d.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libtommath/bn_mp_sub_d.c b/libtommath/bn_mp_sub_d.c
index 0b31cbe..ffeea09 100644
--- a/libtommath/bn_mp_sub_d.c
+++ b/libtommath/bn_mp_sub_d.c
@@ -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;
}
@@ -85,5 +89,5 @@ mp_sub_d (mp_int * a, mp_digit b, mp_int * c)
#endif
/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/bn_mp_sub_d.c,v $ */
-/* $Revision: 1.1.1.2 $ */
-/* $Date: 2005/09/26 16:31:56 $ */
+/* $Revision: 1.1.1.3 $ */
+/* $Date: 2005/12/27 17:59:38 $ */