Commit eebe1d26d04e292cd3686e3c02b5a7af62603687

czurnieden 2019-09-02T18:15:33

repair of #333

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/bn_mp_prime_next_prime.c b/bn_mp_prime_next_prime.c
index aaa821b..330dfa7 100644
--- a/bn_mp_prime_next_prime.c
+++ b/bn_mp_prime_next_prime.c
@@ -39,6 +39,9 @@ mp_err mp_prime_next_prime(mp_int *a, int t, int bbs_style)
                         return MP_OKAY;
                      }
                   }
+               } else {
+                  mp_set(a, s_mp_prime_tab[x + 1]);
+                  return MP_OKAY;
                }
             } else {
                mp_set(a, s_mp_prime_tab[x + 1]);