Modif allocation user_input
This commit is contained in:
parent
38ed0a1f49
commit
e267ecc4e7
1 changed files with 1 additions and 2 deletions
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue