summaryrefslogtreecommitdiff
path: root/add1.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-16 17:58:50 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-16 17:58:50 +0000
commit5ac802a9d07dcbaae34c7a9d4f6a51947d35eff2 (patch)
treebc33544c1ccffb950dcb95db53d993f7c4931e40 /add1.c
parent66bd41bfc05eb69f459a65f21803507585672e25 (diff)
downloadmpfr-5ac802a9d07dcbaae34c7a9d4f6a51947d35eff2.tar.gz
Integer overflows checked.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1562 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'add1.c')
-rw-r--r--add1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/add1.c b/add1.c
index bace22114..ae6ad6a1d 100644
--- a/add1.c
+++ b/add1.c
@@ -210,7 +210,7 @@ mpfr_add1 (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c,
/* determine rounding and sticky bits (and possible carry) */
- difw = an - diff_exp / BITS_PER_MP_LIMB;
+ difw = (mp_exp_t) an - (mp_exp_t) (diff_exp / BITS_PER_MP_LIMB);
/* difw is the number of limbs from b (regarded as having an infinite
precision) that have already been combined with c; -n if the next
n limbs from b won't be combined with c. */