added/fixed null characters
This commit is contained in:
parent
08c4a8eebe
commit
b84b8aa7cc
@ -33,7 +33,7 @@ outputFlags decryptText(char *text, char *key, inputFlags flags)
|
||||
}
|
||||
|
||||
//SET LENGTH (numberBuffer)
|
||||
returningText = malloc(numberBuffer);
|
||||
returningText = malloc(numberBuffer + 1);
|
||||
textKeyChain = malloc(sizeof(int) * numberBuffer);
|
||||
int encryptedTextKeyChain[sizeof(int) * numberBuffer];
|
||||
textKeyChainLength = numberBuffer;
|
||||
@ -82,6 +82,8 @@ outputFlags decryptText(char *text, char *key, inputFlags flags)
|
||||
returningText[i] = (char) textKeyChain[i];
|
||||
}
|
||||
|
||||
strcat(returningText, "\0");
|
||||
|
||||
//LOAD output
|
||||
outputFlags output =
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ outputFlags encryptText(char *text, char *keyNew, inputFlags flags)
|
||||
if (!flags.skipCheck) checkVersion(flags);
|
||||
|
||||
//VARIABLES
|
||||
char *key = malloc(getKeyLength() + 1);
|
||||
char *key = malloc(getKeyLength());
|
||||
char *returningText;
|
||||
char *textBuffer;
|
||||
int *textKeyChain = malloc(sizeof(int) * strlen(text));
|
||||
@ -107,6 +107,8 @@ outputFlags encryptText(char *text, char *keyNew, inputFlags flags)
|
||||
}
|
||||
}
|
||||
|
||||
strcat(returningText, "\0");
|
||||
|
||||
//LOAD output
|
||||
outputFlags output =
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user