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)
|
//SET LENGTH (numberBuffer)
|
||||||
returningText = malloc(sizeof(char) * numberBuffer);
|
returningText = malloc(numberBuffer);
|
||||||
textKeyChain = malloc(sizeof(int) * numberBuffer);
|
textKeyChain = malloc(sizeof(int) * numberBuffer);
|
||||||
int encryptedTextKeyChain[sizeof(int) * numberBuffer];
|
int encryptedTextKeyChain[sizeof(int) * numberBuffer];
|
||||||
textKeyChainLength = numberBuffer;
|
textKeyChainLength = numberBuffer;
|
||||||
|
@ -14,7 +14,7 @@ outputFlags encryptText(char *text, char *keyNew, inputFlags flags)
|
|||||||
if (!flags.skipCheck) checkVersion(flags);
|
if (!flags.skipCheck) checkVersion(flags);
|
||||||
|
|
||||||
//VARIABLES
|
//VARIABLES
|
||||||
char *key = malloc(sizeof(char) * getKeyLength());
|
char *key = malloc(getKeyLength());
|
||||||
char *returningText;
|
char *returningText;
|
||||||
char *textBuffer;
|
char *textBuffer;
|
||||||
int *textKeyChain = malloc(sizeof(int) * strlen(text));
|
int *textKeyChain = malloc(sizeof(int) * strlen(text));
|
||||||
@ -79,7 +79,7 @@ outputFlags encryptText(char *text, char *keyNew, inputFlags flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//ALLOCATE returningText (WITH THE SEPARATORS)
|
//ALLOCATE returningText (WITH THE SEPARATORS)
|
||||||
returningText = malloc(sizeof(char) * numberBuffer + strlen(text) - 1);
|
returningText = malloc(numberBuffer + strlen(text) - 1);
|
||||||
strcpy(returningText, "");
|
strcpy(returningText, "");
|
||||||
|
|
||||||
//LOAD returningText
|
//LOAD returningText
|
||||||
|
@ -59,7 +59,7 @@ void checkVersion(inputFlags flags)
|
|||||||
//COUNT LENGTH OF buffer
|
//COUNT LENGTH OF buffer
|
||||||
fileBuffer = fopen(VERSIONS_NAME, "r");
|
fileBuffer = fopen(VERSIONS_NAME, "r");
|
||||||
fseek(fileBuffer, 0, SEEK_END);
|
fseek(fileBuffer, 0, SEEK_END);
|
||||||
buffer = malloc(sizeof(char) * ftell(fileBuffer));
|
buffer = malloc(ftell(fileBuffer));
|
||||||
fclose(fileBuffer);
|
fclose(fileBuffer);
|
||||||
|
|
||||||
//SET fileBuffer
|
//SET fileBuffer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user