mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 22:15:06 +00:00
Kernel: Update check in Inode::read_entire
The nread variable can't be less than zero anymore.
This commit is contained in:
parent
bf779e182e
commit
58c182b19e
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue