summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mpi/mpi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mpi/mpi.c b/mpi/mpi.c
index 472011d4..198a5a86 100644
--- a/mpi/mpi.c
+++ b/mpi/mpi.c
@@ -3300,7 +3300,7 @@ mp_err s_mp_add_d(mp_int *mp, mp_digit d) /* unsigned digit addition */
mp_size ix = 1, used = USED(mp);
mp_digit *dp = DIGITS(mp);
- w = dp[0] + d;
+ w = convert(mp_word, dp[0]) + d;
dp[0] = ACCUM(w);
k = CARRYOUT(w);