mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 14:19:48 +00:00
less: Properly stop on EOF
This commit is contained in:
parent
e1edd620ee
commit
505910aea1
Notes:
sideshowbarker
2024-07-17 06:34:29 +09:00
Author: https://github.com/demostanis
Commit: 505910aea1
Pull-request: https://github.com/SerenityOS/serenity/pull/15115
Reviewed-by: https://github.com/timschumi
1 changed files with 1 additions and 1 deletions
|
@ -324,7 +324,7 @@ private:
|
||||||
void read_enough_for_line(size_t line)
|
void read_enough_for_line(size_t line)
|
||||||
{
|
{
|
||||||
// This might read a bounded number of extra lines.
|
// 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())
|
if (!read_line())
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue