summaryrefslogtreecommitdiff
path: root/usr.bin/less/linenum.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/less/linenum.c')
-rw-r--r--usr.bin/less/linenum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/less/linenum.c b/usr.bin/less/linenum.c
index 299657a93a3..48672e9f2ac 100644
--- a/usr.bin/less/linenum.c
+++ b/usr.bin/less/linenum.c
@@ -202,7 +202,7 @@ static time_t startime;
static void
longish(void)
{
- if (++loopcount > 100) {
+ if (loopcount >= 0 && ++loopcount > 100) {
loopcount = 0;
if (time(NULL) >= startime + LONGTIME) {
ierror("Calculating line numbers", NULL);