1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-09 09:34:57 +09:00

LibCore: Let IODevice::can_read_line() buffer until \n or EOF

If a line was larger than 1024 bytes or the file ended without a
newline character, can_read_line would return false.

IODevice::can_read_line() now reads until a newline is found or
EOF is reached.

fixes #5907
This commit is contained in:
r-paiva 2021-05-10 21:59:37 +01:00 committed by Andreas Kling
parent edcfbdf4bd
commit 943f4eb287
Notes: sideshowbarker 2024-07-18 17:40:14 +09:00
2 changed files with 21 additions and 6 deletions

View file

@ -161,8 +161,6 @@ public:
return false;
}
// NOTE: Vector::is_null() exists for the benefit of String::copy().
bool is_null() const { return false; }
bool is_empty() const { return size() == 0; }
ALWAYS_INLINE size_t size() const { return m_size; }
size_t capacity() const { return m_capacity; }