Skip to content

Commit

Permalink
Merge aamine#1 of the original project
Browse files Browse the repository at this point in the history
  • Loading branch information
dokutoku committed Nov 11, 2021
2 parents d1be9e6 + 1580491 commit 2037df9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wc-l-syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ do_word_count(int fd, const char *path)
if (n < 0) die(path);
if (n == 0) break;
unsigned long i;
for (i = 0; i < BUFFER_SIZE; i++) {
for (i = 0; i < n; i++) {
if (buf[i] == '\n') {
count++;
}
Expand Down

0 comments on commit 2037df9

Please sign in to comment.