1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:34:57 +00:00

less: Properly stop on EOF

This commit is contained in:
demostanis 2022-09-06 20:46:13 +02:00 committed by Sam Atkins
parent e1edd620ee
commit 505910aea1

View file

@ -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;
}