Skip to content

Commit 260241e

Browse files
author
Maxim
authored
Merge pull request #6 from mcfx-minor-fixes/master
fix: incorrect loop start index in _regen
2 parents 6b8d738 + 0161b4a commit 260241e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

randcrack/randcrack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def _regen(self):
197197
y = self._or_nums(self._and_nums(self.mt[kk], u_bits), self._and_nums(self.mt[kk + 1], l_bits))
198198
self.mt[kk] = self._xor_nums(self._xor_nums(self.mt[kk + M], y[:-1]), mag01[y[-1] & 1])
199199

200-
for kk in range(N - M - 1, N - 1):
200+
for kk in range(N - M, N - 1):
201201
y = self._or_nums(self._and_nums(self.mt[kk], u_bits), self._and_nums(self.mt[kk + 1], l_bits))
202202
self.mt[kk] = self._xor_nums(self._xor_nums(self.mt[kk + (M - N)], y[:-1]), mag01[y[-1] & 1])
203203

0 commit comments

Comments
 (0)