summaryrefslogtreecommitdiffstats
path: root/libtommath/bn_mp_div_d.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtommath/bn_mp_div_d.c')
-rw-r--r--libtommath/bn_mp_div_d.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libtommath/bn_mp_div_d.c b/libtommath/bn_mp_div_d.c
index 6a26d4f0cf6..63efc2cfa69 100644
--- a/libtommath/bn_mp_div_d.c
+++ b/libtommath/bn_mp_div_d.c
@@ -87,7 +87,7 @@ int mp_div_d (mp_int * a, mp_digit b, mp_int * c, mp_digit * d)
w = (w << ((mp_word)DIGIT_BIT)) | ((mp_word)a->dp[ix]);
if (w >= b) {
- t = (mp_digit)(w / b);
+ t = (mp_digit)(word_div_int(w, b));
w -= ((mp_word)t) * ((mp_word)b);
} else {
t = 0;