file_sys/vfs_vector: Fix ignored offset on Write

This commit is contained in:
Frederic L 2019-02-25 00:27:49 +01:00 committed by GitHub
parent 90c780e6f3
commit 517933adcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ std::size_t VectorVfsFile::Write(const u8* data_, std::size_t length, std::size_
if (offset + length > data.size())
data.resize(offset + length);
const auto write = std::min(length, data.size() - offset);
std::memcpy(data.data(), data_, write);
std::memcpy(data.data() + offset, data_, write);
return write;
}