simplified cleaning allocated returningText with calloc
This commit is contained in:
parent
59ba4c8d08
commit
38956cce14
@ -90,8 +90,7 @@ outputFlags encryptText(char *text, char *keyNew)
|
||||
}
|
||||
|
||||
//ALLOCATE returningText (WITH THE SEPARATORS)
|
||||
returningText = malloc(numberBuffer + strlen(text));
|
||||
strcpy(returningText, "");
|
||||
returningText = calloc(numberBuffer + strlen(text), sizeof(char));
|
||||
|
||||
//LOAD returningText
|
||||
for (int i = 0; i < (int) strlen(text); i++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user