Reintroduced Brent's algorithm for cycle detection in lfsr_mount

This commit is contained in:
Christopher Haster
2023-04-27 00:41:24 -05:00
parent 6236f460a4
commit 85ebdd0881
3 changed files with 69 additions and 3 deletions
+1 -1
View File
@@ -878,7 +878,7 @@ def main(disk, block1=0, block2=None, *,
weights.append(weight)
# compare with sequence arithmetic
if off and ((rev - revs[i]) & 0x80000000):
if off and not ((rev - revs[i]) & 0x80000000):
i = len(revs)-1
# print contents of the winning metadata block