diff --git a/1-16.c b/1-16.c index 2fa7dcd..71824ff 100644 --- a/1-16.c +++ b/1-16.c @@ -10,7 +10,7 @@ int ggetline(char line[], int maxline){ } else if (i==maxline-2){ line[i]='\n'; - line[i+1]='\0'; + line[i++]='\0'; } } return i;