Fixed possible bug

This commit is contained in:
2021-07-01 00:22:22 -04:00
parent 200e3b6e4b
commit 88c6071f57

View File

@@ -126,7 +126,7 @@ function isPrime(possiblePrime)
elseif(((possiblePrime % 2) == 0) or ((possiblePrime % 3) == 0)) then
return false;
end
for cnt = 5, math.sqrt(possiblePrime), 6 do
for cnt = 5, math.sqrt(possiblePrime) + 1, 6 do
if(((possiblePrime % cnt) == 0) or ((possiblePrime % (cnt + 2)) == 0)) then
return false;
end