pock: Set the sieve vector size correctly.
[catacomb-python] / pock
diff --git a/pock b/pock
index 3d9f66b..cb49996 100644 (file)
--- a/pock
+++ b/pock
@@ -239,7 +239,7 @@ class Sieve (object):
     n = (limit - 2)/2
     sievesz = (n + me._NBIT - 1)/me._NBIT
     me._sievemax = sievesz*me._NBIT
-    me._bits = n*[0]
+    me._bits = sievesz*[0]
 
     ## This is standard Sieve of Eratosthenes.  For each index i: if
     ## bit i is clear, then p = 2 i + 3 is prime, so set the bits