diff --git a/src/lib/decrypter.c b/src/lib/decrypter.c index a6e1642..577c4b5 100644 --- a/src/lib/decrypter.c +++ b/src/lib/decrypter.c @@ -33,7 +33,7 @@ outputFlags decryptText(char *text, char *key, inputFlags flags) } //SET LENGTH (numberBuffer) - returningText = malloc(sizeof(int) * numberBuffer); + returningText = malloc(sizeof(char) * numberBuffer); textKeyChain = malloc(sizeof(int) * numberBuffer); int encryptedTextKeyChain[sizeof(int) * numberBuffer]; textKeyChainLength = numberBuffer; @@ -54,7 +54,7 @@ outputFlags decryptText(char *text, char *key, inputFlags flags) numberBuffer++; } - textBuffer = malloc(sizeof(int) * numberBuffer); + textBuffer = malloc(sizeof(char) * numberBuffer); //LOAD textBuffer for (int j = 0; j < strlen(text); j++) diff --git a/src/lib/encrypter.c b/src/lib/encrypter.c index b7bbb79..310ee08 100644 --- a/src/lib/encrypter.c +++ b/src/lib/encrypter.c @@ -14,7 +14,7 @@ outputFlags encryptText(char *text, char *keyNew, inputFlags flags) if (!flags.skipCheck) checkVersion(flags); //VARIABLES - char *key = malloc(sizeof(int) * getKeyLength()); + char *key = malloc(sizeof(char) * getKeyLength()); char *returningText; char *textBuffer; int *textKeyChain = malloc(sizeof(int) * strlen(text)); @@ -78,7 +78,7 @@ outputFlags encryptText(char *text, char *keyNew, inputFlags flags) } //ALLOCATE returningText (WITH THE SEPARATORS) - returningText = malloc(sizeof(int) * numberBuffer + strlen(text) - 1); + returningText = malloc(sizeof(char) * numberBuffer + strlen(text) - 1); strcpy(returningText, ""); //LOAD returningText diff --git a/src/lib/test/main.c b/src/lib/test/main.c index 88dde1d..1a7cac3 100644 --- a/src/lib/test/main.c +++ b/src/lib/test/main.c @@ -10,7 +10,7 @@ int main(void) inputFlags flags = { - 1, //SKIP CHECK + 0, //SKIP CHECK 0, //NO OUTPUT };