Commit 98a7131055b7e03f98bf3460123fca86ccb87534

Steffen Jaeckel 2019-03-26T14:29:17

Merge pull request #184 from libtom/explicit_type_cast explicit type-cast

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/bn_fast_s_mp_sqr.c b/bn_fast_s_mp_sqr.c
index 5be8e9d..bd20f7e 100644
--- a/bn_fast_s_mp_sqr.c
+++ b/bn_fast_s_mp_sqr.c
@@ -79,7 +79,7 @@ int fast_s_mp_sqr(const mp_int *a, mp_int *b)
       }
 
       /* store it */
-      W[ix] = _W & MP_MASK;
+      W[ix] = (mp_digit)_W & MP_MASK;
 
       /* make next carry */
       W1 = _W >> (mp_word)DIGIT_BIT;