mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-22 21:37:22 +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:
committed by
Andreas Kling
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user