Initialize the candidate array with zeros to prevent silly candidate counts when a new block interrupts CSieveOfEratosthenes::Weave().

master
mikaelh 2013-07-18 16:49:18 +03:00
parent 917634906d
commit 0fc0a61888
1 changed files with 1 additions and 0 deletions

View File

@ -135,6 +135,7 @@ public:
nCandidatesWords = (nSieveSize + nWordBits - 1) / nWordBits;
nCandidatesBytes = nCandidatesWords * sizeof(unsigned long);
vfCandidates = (unsigned long *)malloc(nCandidatesBytes);
memset(vfCandidates, 0, nCandidatesBytes);
}
~CSieveOfEratosthenes()