diff --git a/src/core/lib/decrypter.c b/src/core/lib/decrypter.c index e0a9aa0..5b95e7e 100644 --- a/src/core/lib/decrypter.c +++ b/src/core/lib/decrypter.c @@ -81,13 +81,7 @@ why2_output_flags why2_decrypt_text(char *text, char *key_new) for (unsigned short j = 2 + (i * 2); j <= 3 + (i * 2); j++) { //ENSURE THERE IS NO \0 (REVERSED) - if (text_copy[j] > 0) - { - text_copy[j]--; - } else - { - text_copy[j]++; - } + if (text_copy[j] == -128) text_copy[j] = 0; } //PUT TOGETHER diff --git a/src/core/lib/encrypter.c b/src/core/lib/encrypter.c index 8f0eea0..5029f1c 100644 --- a/src/core/lib/encrypter.c +++ b/src/core/lib/encrypter.c @@ -132,13 +132,7 @@ why2_output_flags why2_encrypt_text(char *text, char *key_new) for (unsigned long j = 2 + (i * 2); j <= 3 + (i * 2); j++) { //ENSURE THERE IS NO \0 - if (returning_text[j] > 0) - { - returning_text[j]++; - } else - { - returning_text[j]--; - } + if (returning_text[j] == 0) returning_text[j] = -128; } } }