mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-14 00:09:24 +01:00
IOS/FS: Fix ReadDir returning wrong number of entries
ReadDir should always write the actual number of entries in the directory list (`min(max_count, number_of_entries_on_nand)`).
This commit is contained in:
parent
a500347345
commit
4c47417a0e
@ -469,6 +469,8 @@ IPCCommandResult FS::ReadDirectory(const Handle& handle, const IOCtlVRequest& re
|
|||||||
Memory::Write_U8(0, file_list_address + 12);
|
Memory::Write_U8(0, file_list_address + 12);
|
||||||
file_list_address += 13;
|
file_list_address += 13;
|
||||||
}
|
}
|
||||||
|
// Write the actual number of entries in the buffer.
|
||||||
|
Memory::Write_U32(std::min(max_count, static_cast<u32>(list->size())), file_count_address);
|
||||||
return GetFSReply(IPC_SUCCESS);
|
return GetFSReply(IPC_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user