From 505910aea184d121c3a12f7cd60efd73c0ab963c Mon Sep 17 00:00:00 2001 From: demostanis Date: Tue, 6 Sep 2022 20:46:13 +0200 Subject: [PATCH] less: Properly stop on EOF --- Userland/Utilities/less.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Utilities/less.cpp b/Userland/Utilities/less.cpp index f37c1d51f1..820d629a80 100644 --- a/Userland/Utilities/less.cpp +++ b/Userland/Utilities/less.cpp @@ -324,7 +324,7 @@ private: void read_enough_for_line(size_t line) { // This might read a bounded number of extra lines. - while (m_lines.size() < line + m_height - 1) { + while (m_lines.size() < line + m_height) { if (!read_line()) break; }