Modif allocation user_input

This commit is contained in:
rick 2021-02-17 15:36:34 +01:00
parent 38ed0a1f49
commit e267ecc4e7
Signed by: Rick
GPG key ID: 2B593F087240EE99

View file

@ -19,8 +19,7 @@
*/
char* get_input()
{
char *buffer = (char *) malloc(MAX_LENGTH);
memset(buffer, 0, MAX_LENGTH);
char *buffer = (char *) calloc(MAX_LENGTH, sizeof(char));
buffer[0] = '\n';
while (buffer[0] == '\n')