fixed unused copy of usedText
idk
This commit is contained in:
parent
bf96f9e55e
commit
44bc62c73b
@ -60,13 +60,13 @@ outputFlags decryptText(char *text, char *keyNew)
|
|||||||
//VARIABLES
|
//VARIABLES
|
||||||
char *returningText;
|
char *returningText;
|
||||||
int numberBuffer = 1;
|
int numberBuffer = 1;
|
||||||
|
int usedTextDeallocationBuffer = 0;
|
||||||
char *textBuffer = malloc(1);
|
char *textBuffer = malloc(1);
|
||||||
int textKeyChainLength;
|
int textKeyChainLength;
|
||||||
int *textKeyChain;
|
int *textKeyChain;
|
||||||
char *key = strdup(keyNew); //COPY keyNew TO key
|
char *key = strdup(keyNew); //COPY keyNew TO key
|
||||||
int *encryptedTextKeyChain;
|
int *encryptedTextKeyChain;
|
||||||
char *usedText = strdup(text); //COPY text TO usedText
|
char *usedText = strdup(text); //COPY text TO usedText
|
||||||
char *usedTextCopy = usedText; //TODO: wtf
|
|
||||||
|
|
||||||
//GET LENGTH OF returningText AND textKeyChain
|
//GET LENGTH OF returningText AND textKeyChain
|
||||||
for (int i = 0; i < (int) strlen(usedText); i++)
|
for (int i = 0; i < (int) strlen(usedText); i++)
|
||||||
@ -115,6 +115,7 @@ outputFlags decryptText(char *text, char *keyNew)
|
|||||||
encryptedTextKeyChain[i] = atoi(textBuffer);
|
encryptedTextKeyChain[i] = atoi(textBuffer);
|
||||||
|
|
||||||
usedText += numberBuffer + 1;
|
usedText += numberBuffer + 1;
|
||||||
|
usedTextDeallocationBuffer += numberBuffer + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//DECRYPT TEXT
|
//DECRYPT TEXT
|
||||||
@ -150,7 +151,7 @@ outputFlags decryptText(char *text, char *keyNew)
|
|||||||
free(textKeyChain);
|
free(textKeyChain);
|
||||||
free(encryptedTextKeyChain);
|
free(encryptedTextKeyChain);
|
||||||
free(textBuffer);
|
free(textBuffer);
|
||||||
free(usedTextCopy);
|
free(usedText - usedTextDeallocationBuffer);
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user