Skip to content

Commit 2037df9

Browse files
author
dokutoku
committed
Merge aamine#1 of the original project
2 parents d1be9e6 + 1580491 commit 2037df9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wc-l-syscall.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ do_word_count(int fd, const char *path)
4343
if (n < 0) die(path);
4444
if (n == 0) break;
4545
unsigned long i;
46-
for (i = 0; i < BUFFER_SIZE; i++) {
46+
for (i = 0; i < n; i++) {
4747
if (buf[i] == '\n') {
4848
count++;
4949
}

0 commit comments

Comments
 (0)