mirror of
https://github.com/nolongeractivemp3/shipthatcode-c.git
synced 2026-11-24 18:45:49 +01:00
lesson 12 fixed
This commit is contained in:
1 parent
59abd98f10
commit
317cef8452
1 file changed
+1
-1
@@ -66,7 +66,7 @@ int main(void) {
|
||||
line in it as <number>:<text> (numbered from 1, no newline inside
|
||||
the text), close it, then print the total as below. */
|
||||
int total = 0;
|
||||
char buf[128];
|
||||
char buf[LINE_SIZE];
|
||||
FILE *r = fopen(path, "r"); /* w NOT closed yet */
|
||||
while (fgets(buf, sizeof buf, r) != NULL) {
|
||||
total ++;
|
||||
|
||||
Reference in new issue
Block a user