Kernel: Fix ext2 directory listing for big directories

This commit is contained in:
Bananymous 2023-11-06 20:43:58 +02:00
parent 639fd8804c
commit 181d139c7d
1 changed files with 1 additions and 2 deletions

View File

@ -306,8 +306,7 @@ done:
ASSERT(mode().ifdir());
ASSERT(offset >= 0);
const uint32_t data_block_count = blocks();
if (offset >= data_block_count)
if (offset >= max_used_data_block_count())
{
list->entry_count = 0;
return {};