From 5bd6acd0657ca6ef57db986c4065640c0ad6cb7b Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Sun, 10 May 2020 01:20:23 +0200 Subject: [PATCH] Bug fix --- caesar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/caesar.py b/caesar.py index 016daf6..1013148 100644 --- a/caesar.py +++ b/caesar.py @@ -28,7 +28,7 @@ for char in txt_list: # loop through all of the chars index = index + in_key # shift the alphabet while( index > alen - 1 ): #cycle through the alphabet print("Alphabet cycle") - index = (index + in_key) - (alen - 1) + index = index - (alen - 1) decryp_list[charindex] = alphabet[in_alphabet][index]