// ciphering
for (int i = 0, n = strlen(plaintext); i < n; i++)
{
...
// lowercase
if (plaintext[i] > '`' && plaintext[i] < '{')
{
if (plaintext [i] + key < '{')
{
ciphertext[i] = (plaintext[i] + key);
}
// overshift
else if (ciphertext[i] + key > 122)
{
ciphertext[i] = (plaintext[i] + key);
do
{
ciphertext[i] -= 26;
}
while (ciphertext[i] > 122);
}
}
I have the same code directly above for uppercase, with '[' and 'Z' instead of '{' and 122 as appropriate. Directly below it is code that works for non-letters. When the code is applied for lowercase letters with a key of less than or equal to 52, it works. However, when applied to specifically lowercase letters with a key of more than 52, there is no return (i.e it returns like /200 which doesn't appear, per debug50 and using printf on a specific char.