diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -36,7 +36,8 @@
     if not M >> i:
         bit = i
         break
-exit()
+if bit == 0:
+    exit()
 nums = [0] * bit
 for i in range(1, bit + 1):
     if i != bit:
