Skip to content
Snippets Groups Projects
Commit 161f080c authored by dario.genga's avatar dario.genga
Browse files

Fix the combination length calculation

parent f9f376e1
Branches
No related tags found
No related merge requests found
......@@ -212,7 +212,7 @@ def reed_solomon(points, data_length, last_error_index, prime_number):
Returns:
str: The corrected message.
"""
combination_length = data_length - len(points[:last_error_index])
combination_length = data_length - len(points[last_error_index + 1:])
# Parse each combination of points possible (exclude the correct points)
for x in itertools.combinations(points[: last_error_index + 1], combination_length):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment