added NULL character to generated key
This commit is contained in:
parent
35959a4393
commit
5093d2395f
@ -14,7 +14,7 @@ outputFlags encryptText(char *text, char *keyNew, inputFlags flags)
|
||||
if (!flags.skipCheck) checkVersion(flags);
|
||||
|
||||
//VARIABLES
|
||||
char *key = malloc(getKeyLength());
|
||||
char *key = malloc(getKeyLength() + 1);
|
||||
char *returningText;
|
||||
char *textBuffer;
|
||||
int *textKeyChain = malloc(sizeof(int) * strlen(text));
|
||||
@ -61,6 +61,8 @@ outputFlags encryptText(char *text, char *keyNew, inputFlags flags)
|
||||
key[i] = (char) numberBuffer;
|
||||
}
|
||||
|
||||
key[getKeyLength()] = '\0'; //TODO: CHECK IF THIS CAN'T CAUSE SOME LITTLE TROUBLES (SHOULDN'T)
|
||||
|
||||
skipKey:
|
||||
|
||||
//LOAD textKeyChain
|
||||
|
Loading…
x
Reference in New Issue
Block a user