mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-22 10:36:24 +00:00
less: Fix condition to read more data
While mathematically equivalent, the presence of a size_t forces the comparison to work with size_t's. This means that '-1 < 0' is false, contrary to the 'mathematically pure' interpretation of the inequality.
This commit is contained in:
parent
5096f9cff5
commit
4e1318fb0e
|
@ -139,7 +139,7 @@ public:
|
|||
{
|
||||
clear_status();
|
||||
|
||||
while (n - (m_lines.size() - m_line) + m_height - 1 > 0) {
|
||||
while (m_lines.size() < m_line + n + m_height - 1) {
|
||||
if (!read_line())
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue