mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-10 09:45:00 +00:00
LibC: Handle fgets(size = 0)
I accidentally broke this in the recent rewrite. This reinstantiates the
behavior implemented in 6571468525.
This commit is contained in:
committed by
Andreas Kling
parent
da23514431
commit
776275a747
@@ -324,6 +324,9 @@ bool FILE::gets(u8* data, size_t size)
|
||||
// separate implementation.
|
||||
size_t total_read = 0;
|
||||
|
||||
if (size == 0)
|
||||
return false;
|
||||
|
||||
while (size > 1) {
|
||||
if (m_buffer.may_use()) {
|
||||
// Let's see if the buffer has something queued for us.
|
||||
|
||||
Reference in New Issue
Block a user