diff --git a/Source/Core/Core/IOS/FS/FileSystemProxy.cpp b/Source/Core/Core/IOS/FS/FileSystemProxy.cpp index 2301cf7cad..587577d497 100644 --- a/Source/Core/Core/IOS/FS/FileSystemProxy.cpp +++ b/Source/Core/Core/IOS/FS/FileSystemProxy.cpp @@ -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((*list)[i].size()) + 1; } // Write the actual number of entries in the buffer. Memory::Write_U32(std::min(max_count, static_cast(list->size())), file_count_address);