mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 19:29:16 +00:00
Kernel: Update check in Inode::read_entire
The nread variable can't be less than zero anymore.
This commit is contained in:
committed by
Andreas Kling
parent
bf779e182e
commit
58c182b19e
@@ -61,7 +61,7 @@ KResultOr<NonnullOwnPtr<KBuffer>> Inode::read_entire(FileDescription* descriptio
|
||||
return result.error();
|
||||
nread = result.value();
|
||||
VERIFY(nread <= sizeof(buffer));
|
||||
if (nread <= 0)
|
||||
if (nread == 0)
|
||||
break;
|
||||
builder.append((const char*)buffer, nread);
|
||||
offset += nread;
|
||||
|
||||
Reference in New Issue
Block a user