aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-05-31 23:55:39 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-05-31 23:55:39 +0000
commitfdcfa2aba7b804082090c424f11d0cf8cad30405 (patch)
treed799d69401193de4582467e6645d2c9d14453c07 /miscutils
parent342b0ab945bb335ead1d23a3bddf9d77fc944f56 (diff)
downloadbusybox-fdcfa2aba7b804082090c424f11d0cf8cad30405.tar.gz
less: less <HUGEFILE + [End] busy loops, fix it
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) {