From c7b60eb80730a403c2aa837378b5b8ac6de4aedc Mon Sep 17 00:00:00 2001 From: weidai Date: Tue, 10 Feb 2004 02:30:58 +0000 Subject: fix ignoring pSelector in FirstPrime --- nbtheory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nbtheory.cpp') diff --git a/nbtheory.cpp b/nbtheory.cpp index 7d857fbf..12514237 100644 --- a/nbtheory.cpp +++ b/nbtheory.cpp @@ -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; -- cgit v1.2.1