summaryrefslogtreecommitdiffstats
path: root/5/7.c
diff options
context:
space:
mode:
authorSadeep Madurange <smadurange@users.noreply.github.com>2022-01-02 18:23:05 +0800
committerSadeep Madurange <smadurange@users.noreply.github.com>2022-01-02 18:23:05 +0800
commitcf8cc605e3454cc56b0b70d4d13f1c807730c9d6 (patch)
tree989cdddfa6ec758da01227066d518d0a5468e18d /5/7.c
parent2c9bb6e32d4fcab4412cda36e7ef5367283d8b8c (diff)
downloadk&r-exercises-cf8cc605e3454cc56b0b70d4d13f1c807730c9d6.tar.gz
5.7
Diffstat (limited to '5/7.c')
-rw-r--r--5/7.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/5/7.c b/5/7.c
index bb426dd..ed409f3 100644
--- a/5/7.c
+++ b/5/7.c
@@ -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;