aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/less.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/miscutils/less.c b/miscutils/less.c
index 7be634fd0..9b2c43bd5 100644
--- a/miscutils/less.c
+++ b/miscutils/less.c
@@ -347,8 +347,10 @@ static void read_lines(void)
} else {
flines[max_fline] = xrealloc(current_line, strlen(current_line)+1);
}
- if (max_fline >= MAXLINES)
+ if (max_fline >= MAXLINES) {
+ eof_error = 0; /* Pretend we saw EOF */
break;
+ }
if (max_fline > cur_fline + max_displayed_line)
break;
if (eof_error <= 0) {