|
@@ -149,8 +149,9 @@ private:
|
|
|
length, data.size());
|
|
length, data.size());
|
|
|
|
|
|
|
|
// Write the data to the Storage backend
|
|
// 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,
|
|
ASSERT_MSG(static_cast<s64>(written) == length,
|
|
|
"Could not write all bytes to file (requested={:016X}, actual={:016X}).", length,
|
|
"Could not write all bytes to file (requested={:016X}, actual={:016X}).", length,
|