summaryrefslogtreecommitdiff
path: root/src/sum.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2017-01-12 21:40:50 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2017-01-12 21:40:50 +0000
commitedaf9d5f31b86afa7543bf4a203dfa124641a62e (patch)
tree78f01216f53c4f3d9719651e232dd337098235db /src/sum.c
parent020eb2175542cff10b254f3e5b42ef34464c8d8e (diff)
downloadmpfr-edaf9d5f31b86afa7543bf4a203dfa124641a62e.tar.gz
fixed bug in urandomb.c reported by Dominic Chen
(https://sympa.inria.fr/sympa/arc/mpfr/2017-01/msg00011.html) and replaced MPN_COPY_INCR/MPN_COPY_DECR by mpn_copyi/mpn_copyd git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11193 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/sum.c')
-rw-r--r--src/sum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sum.c b/src/sum.c
index e7cfa0028..95aa9553b 100644
--- a/src/sum.c
+++ b/src/sum.c
@@ -473,7 +473,7 @@ sum_raw (mp_limb_t *wp, mp_size_t ws, mpfr_prec_t wq, mpfr_ptr *const x,
if (MPFR_LIKELY (shiftc != 0))
mpn_lshift (wp + shifts, wp, ws - shifts, shiftc);
else
- MPN_COPY_DECR (wp + shifts, wp, ws - shifts);
+ mpn_copyd (wp + shifts, wp, ws - shifts);
MPN_ZERO (wp, shifts);
/* Compute minexp = minexp - shiftq safely. */
SAFE_SUB (minexp, minexp, shiftq);