Commit 29987bca9ac09c6482a8caa638e5f1a99d5a6460

Francois Perrad 2018-12-26T08:09:57

fix cast

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/bn_mp_prime_is_prime.c b/bn_mp_prime_is_prime.c
index ee68adb..43d9924 100644
--- a/bn_mp_prime_is_prime.c
+++ b/bn_mp_prime_is_prime.c
@@ -307,7 +307,7 @@ int mp_prime_is_prime(const mp_int *a, int t, int *result)
          }
 #endif
          /* Ceil, because small numbers have a right to live, too, */
-         len = (int)((fips_rand + DIGIT_BIT) / DIGIT_BIT);
+         len = (((int)fips_rand + DIGIT_BIT) / DIGIT_BIT);
          /*  Unlikely. */
          if (len < 0) {
             ix--;