fix ignoring pSelector in FirstPrime

pull/2/head
weidai 2004-02-10 02:30:58 +00:00
parent 735020666b
commit c7b60eb807
1 changed files with 1 additions and 1 deletions

View File

@ -379,7 +379,7 @@ bool FirstPrime(Integer &p, const Integer &max, const Integer &equiv, const Inte
if (gcd != Integer::One())
{
// the only possible prime p such that p%mod==equiv where GCD(mod,equiv)!=1 is GCD(mod,equiv)
if (p <= gcd && gcd <= max && IsPrime(gcd))
if (p <= gcd && gcd <= max && IsPrime(gcd) && (!pSelector || pSelector->IsAcceptable(gcd)))
{
p = gcd;
return true;