summaryrefslogtreecommitdiffstats
path: root/1/17.c
diff options
context:
space:
mode:
Diffstat (limited to '1/17.c')
-rw-r--r--1/17.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/1/17.c b/1/17.c
index 2797b10..70ee4f2 100644
--- a/1/17.c
+++ b/1/17.c
@@ -30,5 +30,5 @@ int cgetline(char s[], int max) {
s[i] = c;
s[i] = '\0';
- return c != '\n' && c != EOF ? -1 : i;
+ return c != '\n' && c != EOF ? -1 : i - 1;
} \ No newline at end of file