summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/get_ui.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/get_ui.c b/src/get_ui.c
index e7c73fe8d..359113625 100644
--- a/src/get_ui.c
+++ b/src/get_ui.c
@@ -66,11 +66,13 @@ mpfr_get_ui (mpfr_srcptr f, mpfr_rnd_t rnd)
#else
while (exp > GMP_NUMB_BITS)
{
+ MPFR_ASSERTD (n > 0);
s += (unsigned long) MPFR_MANT(x)[n - 1] << (exp - GMP_NUMB_BITS);
n--;
exp -= GMP_NUMB_BITS;
}
#endif
+ MPFR_ASSERTD (n > 0);
s += MPFR_MANT(x)[n - 1] >> (GMP_NUMB_BITS - exp);
}