diff options
Diffstat (limited to 'src')
| -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: | |||
| 149 | length, data.size()); | 149 | length, data.size()); |
| 150 | 150 | ||
| 151 | // Write the data to the Storage backend | 151 | // Write the data to the Storage backend |
| 152 | std::vector<u8> actual_data(data.begin(), data.begin() + length); | 152 | const auto write_size = |
| 153 | const std::size_t written = backend->WriteBytes(std::move(actual_data), offset); | 153 | static_cast<std::size_t>(std::distance(data.begin(), data.begin() + length)); |
| 154 | const std::size_t written = backend->Write(data.data(), write_size, offset); | ||
| 154 | 155 | ||
| 155 | ASSERT_MSG(static_cast<s64>(written) == length, | 156 | ASSERT_MSG(static_cast<s64>(written) == length, |
| 156 | "Could not write all bytes to file (requested={:016X}, actual={:016X}).", length, | 157 | "Could not write all bytes to file (requested={:016X}, actual={:016X}).", length, |