aboutsummaryrefslogtreecommitdiff
path: root/toys/tail.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/tail.c')
-rw-r--r--toys/tail.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/tail.c b/toys/tail.c
index 18369ccb..a029eca9 100644
--- a/toys/tail.c
+++ b/toys/tail.c
@@ -176,7 +176,7 @@ static void do_tail(int fd, char *name)
}
if (lines) {
- if(try[count] != '\n') continue;
+ if(try[count] != '\n' && count != len-1) continue;
if (lines<0) {
if (!++lines) ++lines;
continue;