mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 10:01:13 +09: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
Notes:
sideshowbarker
2024-07-18 12:07:01 +09:00
Author: https://github.com/gunnarbeutner
Commit: 58c182b19e
Pull-request: https://github.com/SerenityOS/serenity/pull/8108
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