Initialize the candidate array with zeros to prevent silly candidate counts when a new block interrupts CSieveOfEratosthenes::Weave().
parent
917634906d
commit
0fc0a61888
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue