From 161f080c024eee18d08fde4acb74e7920f7d7892 Mon Sep 17 00:00:00 2001
From: "dario.genga" <dario.genga@etu.hesge.ch>
Date: Tue, 18 Jan 2022 10:48:48 +0100
Subject: [PATCH] Fix the combination length calculation

---
 corrector.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/corrector.py b/corrector.py
index bf41327..830b558 100644
--- a/corrector.py
+++ b/corrector.py
@@ -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):
-- 
GitLab