diff options
| author | Sadeep Madurange <smadurange@users.noreply.github.com> | 2022-01-02 18:23:05 +0800 |
|---|---|---|
| committer | Sadeep Madurange <smadurange@users.noreply.github.com> | 2022-01-02 18:23:05 +0800 |
| commit | cf8cc605e3454cc56b0b70d4d13f1c807730c9d6 (patch) | |
| tree | 989cdddfa6ec758da01227066d518d0a5468e18d /5/7.c | |
| parent | 2c9bb6e32d4fcab4412cda36e7ef5367283d8b8c (diff) | |
| download | k&r-exercises-cf8cc605e3454cc56b0b70d4d13f1c807730c9d6.tar.gz | |
5.7
Diffstat (limited to '5/7.c')
| -rw-r--r-- | 5/7.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -28,7 +28,7 @@ int readlines(char **lines, int maxlines) { int i, len; char *s; - for (i = 0; i <= maxlines; i++) { + for (i = 0; i < maxlines; i++) { s = fgets(s, MAXLEN, stdin); if (!s) return i; |
