From 9b57343c4ce35d6badf1026bfc7d1c065dc5087c Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Wed, 27 Apr 2022 18:17:35 +0200 Subject: [PATCH] moved textKeyChain to 'variables' part --- src/decrypter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/decrypter.c b/src/decrypter.c index de5f51b..675dc8f 100644 --- a/src/decrypter.c +++ b/src/decrypter.c @@ -26,6 +26,7 @@ decryptText(char *text, char *key) int numberBuffer = 1; char *textBuffer; int textKeyChainLength; + int *textKeyChain; //GET LENGTH OF returningText AND textKeyChain for (int i = 0; i < strlen(text); i++) @@ -35,7 +36,7 @@ decryptText(char *text, char *key) //SET LENGTH (numberBuffer) returningText = malloc(numberBuffer); - int *textKeyChain = malloc(numberBuffer * sizeof(int)); + textKeyChain = malloc(numberBuffer * sizeof(int)); int encryptedTextKeyChain[numberBuffer]; textKeyChainLength = numberBuffer;