diff options
author | Lioncash <mathew1800@gmail.com> | 2018-07-19 15:57:00 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-07-19 15:58:32 +0200 |
commit | 6be342118abbc68296c38b91b7558cbeb30ad4c0 (patch) | |
tree | cccd09885f25e8c7e0b6b4d94d246a05c6834b2f /src | |
parent | fsp_srv: Respect write length in Write() (diff) | |
download | yuzu-6be342118abbc68296c38b91b7558cbeb30ad4c0.tar yuzu-6be342118abbc68296c38b91b7558cbeb30ad4c0.tar.gz yuzu-6be342118abbc68296c38b91b7558cbeb30ad4c0.tar.bz2 yuzu-6be342118abbc68296c38b91b7558cbeb30ad4c0.tar.lz yuzu-6be342118abbc68296c38b91b7558cbeb30ad4c0.tar.xz yuzu-6be342118abbc68296c38b91b7558cbeb30ad4c0.tar.zst yuzu-6be342118abbc68296c38b91b7558cbeb30ad4c0.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/service/filesystem/fsp_srv.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index e3f237c5c..c093c1183 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp @@ -138,15 +138,15 @@ private: const std::vector<u8> data = ctx.ReadBuffer(); ASSERT_MSG( - data.size() <= length, + static_cast<s64>(data.size()) <= length, "Attempting to write more data than requested (requested={:016X}, actual={:016X}).", length, data.size()); // Write the data to the Storage backend std::vector<u8> actual_data(data.begin(), data.begin() + length); - const auto written = backend->WriteBytes(std::move(actual_data), offset); + const std::size_t written = backend->WriteBytes(std::move(actual_data), offset); - ASSERT_MSG(written == length, + ASSERT_MSG(static_cast<s64>(written) == length, "Could not write all bytes to file (requested={:016X}, actual={:016X}).", length, written); |