Commit 8ccfabf63fa85293050c3fd4e1091459c939af7f

nijtmans 2019-03-26T11:32:33

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;