libsec: fix genprime() to produce normalized result

this fixed bug "assert_failed_m-flags__mpnorm_since_283cc2200e34".
This commit is contained in:
cinap_lenrek 2015-12-01 09:40:24 +01:00
parent bdaa002255
commit 3a40210df8

View file

@ -17,6 +17,7 @@ genprime(mpint *p, int n, int accuracy)
p->p[p->top-1] &= (x-1);
p->p[p->top-1] |= x;
p->p[0] |= 1;
mpnorm(p);
// keep icrementing till it looks prime
for(;;){