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)
|
//ALLOCATE returningText (WITH THE SEPARATORS)
|
||||||
returningText = malloc(numberBuffer + strlen(text));
|
returningText = calloc(numberBuffer + strlen(text), sizeof(char));
|
||||||
strcpy(returningText, "");
|
|
||||||
|
|
||||||
//LOAD returningText
|
//LOAD returningText
|
||||||
for (int i = 0; i < (int) strlen(text); i++)
|
for (int i = 0; i < (int) strlen(text); i++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user