diff --git a/caesar.py b/caesar.py index 52e713f..3740b4c 100644 --- a/caesar.py +++ b/caesar.py @@ -26,9 +26,8 @@ for char in txt_list: # loop through all of the chars print("Decrypting char-index: " + str(charindex) + " (" + char + ")") index = index + in_key # shift the alphabet - while( index >= alen ): #cycle through the alphabet - diff = (index + in_key) - (alen - 1) - index = 0 + diff # a bit spaghetti but who doesn't like spaghetti + while( index > alen - 1 ): #cycle through the alphabet + index = (index + in_key) - (alen - 1) decryp_list[charindex] = alphabet[in_alphabet][index] diff --git a/lib/__pycache__/vars.cpython-38.pyc b/lib/__pycache__/vars.cpython-38.pyc index a40c1d8..786cd15 100644 Binary files a/lib/__pycache__/vars.cpython-38.pyc and b/lib/__pycache__/vars.cpython-38.pyc differ