diff options
Diffstat (limited to 'nbtheory.cpp')
-rw-r--r-- | nbtheory.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nbtheory.cpp b/nbtheory.cpp index 852beb5..8689cea 100644 --- a/nbtheory.cpp +++ b/nbtheory.cpp @@ -440,7 +440,7 @@ bool FirstPrime(Integer &p, const Integer &max, const Integer &equiv, const Inte else pItr = primeTable; - while (pItr < primeTable+primeTableSize && *pItr%mod != equiv) + while (pItr < primeTable+primeTableSize && !(*pItr%mod == equiv && (!pSelector || pSelector->IsAcceptable(*pItr)))) ++pItr; if (pItr < primeTable+primeTableSize) |