lesson 12 fixed

This commit is contained in:
deck committed 2026-10-14 19:16:45 +02:00
1 parent 59abd98f10
commit 317cef8452
1 file changed
+1 -1
+1 -1
View File
@@ -66,7 +66,7 @@ int main(void) {
line in it as <number>:<text> (numbered from 1, no newline inside line in it as <number>:<text> (numbered from 1, no newline inside
the text), close it, then print the total as below. */ the text), close it, then print the total as below. */
int total = 0; int total = 0;
char buf[128]; char buf[LINE_SIZE];
FILE *r = fopen(path, "r"); /* w NOT closed yet */ FILE *r = fopen(path, "r"); /* w NOT closed yet */
while (fgets(buf, sizeof buf, r) != NULL) { while (fgets(buf, sizeof buf, r) != NULL) {
total ++; total ++;