summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSadeep Madurange <smadurange@users.noreply.github.com>2022-01-02 18:27:42 +0800
committerSadeep Madurange <smadurange@users.noreply.github.com>2022-01-02 18:27:42 +0800
commitd5ad9015eea7d9da8f88b5e33a3652c2513f01d7 (patch)
tree264ff5b206a44e9be1004aee2680a195b84ac69c
parent1596733e91f3fb9c484b6822684539bc004e0aa4 (diff)
downloadk&r-exercises-d5ad9015eea7d9da8f88b5e33a3652c2513f01d7.tar.gz
5.7
-rw-r--r--5/7.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/5/7.c b/5/7.c
index 9dbe0ac..ab9d8a3 100644
--- a/5/7.c
+++ b/5/7.c
@@ -13,9 +13,9 @@ int main() {
char **lines;
lines = malloc(sizeof(char *) * MAXLINES);
-
for (i = 0; i < MAXLINES - 1; i++)
lines[i] = malloc(sizeof(char) * MAXLEN);
+
count = readlines(lines, MAXLINES);
for (i = 0; i < count; i++)