From 9e40e33700537863bd1a3a98eabf57c465857365 Mon Sep 17 00:00:00 2001 From: celso Date: Wed, 9 Nov 2022 07:14:28 -0300 Subject: [PATCH] made a small change to 1-16 --- 1-16.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;