diff options
| author | Sadeep Madurange <smadurange@users.noreply.github.com> | 2021-11-20 22:12:39 +0800 |
|---|---|---|
| committer | Sadeep Madurange <smadurange@users.noreply.github.com> | 2021-11-20 22:12:39 +0800 |
| commit | 3ea0f0211b4588476f3a92981ad8ed64b0715177 (patch) | |
| tree | 67265e568e177eaf77e96b5d5cbd498b2b7cb06c /1/17.c | |
| parent | 6a047d173de71046d9e10d07fcbd39bbaf9078ed (diff) | |
| download | k&r-exercises-3ea0f0211b4588476f3a92981ad8ed64b0715177.tar.gz | |
1.19
Diffstat (limited to '1/17.c')
| -rw-r--r-- | 1/17.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |
