diff options
author | Jim Meyering <jim@meyering.net> | 1995-02-16 00:10:49 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1995-02-16 00:10:49 +0000 |
commit | 695dd1100332ca4589dfc7bef3b91035286a526b (patch) | |
tree | 8572e4722c43bcdfa0fa76f76068f0932eaf7848 /src | |
parent | e1453c467f54f41f042efe2b87516868e5da67af (diff) | |
download | coreutils-695dd1100332ca4589dfc7bef3b91035286a526b.tar.xz |
(wc): Fix off-by-one error when counting lines.
Diffstat (limited to 'src')
-rw-r--r-- | src/wc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -253,7 +253,7 @@ wc (fd, file) --p; do { - p = memchr (p + 1, '\n', bytes_read); + p = memchr (p + 1, '\n', bytes_read + 1); ++lines; } while (p != buf + bytes_read); |