diff options
author | Lioncash <mathew1800@gmail.com> | 2018-07-19 17:01:05 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-07-19 17:01:07 +0200 |
commit | 6c1ba02e0cacfd66cf36d40a4b0f9794bc2ca26e (patch) | |
tree | 63998475a888bfdfb0a0c1f1aabcc903fd8b6f95 /src/core/hle/service | |
parent | fsp_srv: Remove unnecessary std::vector construction in IDirectory's Read() function (diff) | |
download | yuzu-6c1ba02e0cacfd66cf36d40a4b0f9794bc2ca26e.tar yuzu-6c1ba02e0cacfd66cf36d40a4b0f9794bc2ca26e.tar.gz yuzu-6c1ba02e0cacfd66cf36d40a4b0f9794bc2ca26e.tar.bz2 yuzu-6c1ba02e0cacfd66cf36d40a4b0f9794bc2ca26e.tar.lz yuzu-6c1ba02e0cacfd66cf36d40a4b0f9794bc2ca26e.tar.xz yuzu-6c1ba02e0cacfd66cf36d40a4b0f9794bc2ca26e.tar.zst yuzu-6c1ba02e0cacfd66cf36d40a4b0f9794bc2ca26e.zip |
Diffstat (limited to 'src/core/hle/service')
-rw-r--r-- | src/core/hle/service/filesystem/fsp_srv.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index 673eaabf0..e7ffb6bd1 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp @@ -149,8 +149,9 @@ private: length, data.size()); // Write the data to the Storage backend - std::vector<u8> actual_data(data.begin(), data.begin() + length); - const std::size_t written = backend->WriteBytes(std::move(actual_data), offset); + const auto write_size = + static_cast<std::size_t>(std::distance(data.begin(), data.begin() + length)); + const std::size_t written = backend->Write(data.data(), write_size, offset); ASSERT_MSG(static_cast<s64>(written) == length, "Could not write all bytes to file (requested={:016X}, actual={:016X}).", length, |