removed only char sizeof
'cause char length is 1 lulw
This commit is contained in:
parent
031bdd0fdb
commit
6282bc6aec
@ -33,7 +33,7 @@ outputFlags decryptText(char *text, char *key, inputFlags flags)
|
||||
}
|
||||
|
||||
//SET LENGTH (numberBuffer)
|
||||
returningText = malloc(sizeof(char) * numberBuffer);
|
||||
returningText = malloc(numberBuffer);
|
||||
textKeyChain = malloc(sizeof(int) * numberBuffer);
|
||||
int encryptedTextKeyChain[sizeof(int) * numberBuffer];
|
||||
textKeyChainLength = numberBuffer;
|
||||
|
@ -14,7 +14,7 @@ outputFlags encryptText(char *text, char *keyNew, inputFlags flags)
|
||||
if (!flags.skipCheck) checkVersion(flags);
|
||||
|
||||
//VARIABLES
|
||||
char *key = malloc(sizeof(char) * getKeyLength());
|
||||
char *key = malloc(getKeyLength());
|
||||
char *returningText;
|
||||
char *textBuffer;
|
||||
int *textKeyChain = malloc(sizeof(int) * strlen(text));
|
||||
@ -79,7 +79,7 @@ outputFlags encryptText(char *text, char *keyNew, inputFlags flags)
|
||||
}
|
||||
|
||||
//ALLOCATE returningText (WITH THE SEPARATORS)
|
||||
returningText = malloc(sizeof(char) * numberBuffer + strlen(text) - 1);
|
||||
returningText = malloc(numberBuffer + strlen(text) - 1);
|
||||
strcpy(returningText, "");
|
||||
|
||||
//LOAD returningText
|
||||
|
@ -59,7 +59,7 @@ void checkVersion(inputFlags flags)
|
||||
//COUNT LENGTH OF buffer
|
||||
fileBuffer = fopen(VERSIONS_NAME, "r");
|
||||
fseek(fileBuffer, 0, SEEK_END);
|
||||
buffer = malloc(sizeof(char) * ftell(fileBuffer));
|
||||
buffer = malloc(ftell(fileBuffer));
|
||||
fclose(fileBuffer);
|
||||
|
||||
//SET fileBuffer
|
||||
|
Loading…
x
Reference in New Issue
Block a user