summaryrefslogtreecommitdiffstats
path: root/libtommath/bn_mp_div.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtommath/bn_mp_div.c')
-rw-r--r--libtommath/bn_mp_div.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libtommath/bn_mp_div.c b/libtommath/bn_mp_div.c
index aee9c94324d..723c8b503dd 100644
--- a/libtommath/bn_mp_div.c
+++ b/libtommath/bn_mp_div.c
@@ -195,7 +195,7 @@ int mp_div (mp_int * a, mp_int * b, mp_int * c, mp_int * d)
mp_word tmp;
tmp = ((mp_word) x.dp[i]) << ((mp_word) DIGIT_BIT);
tmp |= ((mp_word) x.dp[i - 1]);
- tmp /= ((mp_word) y.dp[t]);
+ tmp = word_div_int(tmp, (int)y.dp[t]);
if (tmp > (mp_word) MP_MASK)
tmp = MP_MASK;
q.dp[i - t - 1] = (mp_digit) (tmp & (mp_word) (MP_MASK));