summaryrefslogtreecommitdiff
path: root/miscutils/less.c
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils/less.c')
-rw-r--r--miscutils/less.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/miscutils/less.c b/miscutils/less.c
index 7be634f..9b2c43b 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) {