IOS/FS: Fix ReadDirectory file list copying
Each entry can take up to 13 bytes (including the terminating null character) but should not be aligned to 13 bytes.
This commit is contained in:
parent
4c47417a0e
commit
1176ae6512
|
@ -467,7 +467,7 @@ IPCCommandResult FS::ReadDirectory(const Handle& handle, const IOCtlVRequest& re
|
|||
Memory::Memset(file_list_address, 0, 13);
|
||||
Memory::CopyToEmu(file_list_address, (*list)[i].data(), (*list)[i].size());
|
||||
Memory::Write_U8(0, file_list_address + 12);
|
||||
file_list_address += 13;
|
||||
file_list_address += static_cast<u32>((*list)[i].size()) + 1;
|
||||
}
|
||||
// Write the actual number of entries in the buffer.
|
||||
Memory::Write_U32(std::min(max_count, static_cast<u32>(list->size())), file_count_address);
|
||||
|
|
Loading…
Reference in New Issue