diff options
author | bunnei <bunneidev@gmail.com> | 2019-11-28 17:43:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-28 17:43:17 +0100 |
commit | e3ee017e91ef4d713f1af8cb60c5157e40d43f18 (patch) | |
tree | e0a5b47cac1d548599b8ceba7f71b40746fe6b48 /src/core/hle/service/filesystem | |
parent | Merge pull request #3171 from lioncash/internal-link (diff) | |
parent | core/memory; Migrate over SetCurrentPageTable() to the Memory class (diff) | |
download | yuzu-e3ee017e91ef4d713f1af8cb60c5157e40d43f18.tar yuzu-e3ee017e91ef4d713f1af8cb60c5157e40d43f18.tar.gz yuzu-e3ee017e91ef4d713f1af8cb60c5157e40d43f18.tar.bz2 yuzu-e3ee017e91ef4d713f1af8cb60c5157e40d43f18.tar.lz yuzu-e3ee017e91ef4d713f1af8cb60c5157e40d43f18.tar.xz yuzu-e3ee017e91ef4d713f1af8cb60c5157e40d43f18.tar.zst yuzu-e3ee017e91ef4d713f1af8cb60c5157e40d43f18.zip |
Diffstat (limited to 'src/core/hle/service/filesystem')
-rw-r--r-- | src/core/hle/service/filesystem/fsp_srv.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index ea9cc901e..55d62fc5e 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp @@ -391,13 +391,10 @@ public: } void RenameFile(Kernel::HLERequestContext& ctx) { - std::vector<u8> buffer; - buffer.resize(ctx.BufferDescriptorX()[0].Size()); - Memory::ReadBlock(ctx.BufferDescriptorX()[0].Address(), buffer.data(), buffer.size()); + std::vector<u8> buffer = ctx.ReadBuffer(0); const std::string src_name = Common::StringFromBuffer(buffer); - buffer.resize(ctx.BufferDescriptorX()[1].Size()); - Memory::ReadBlock(ctx.BufferDescriptorX()[1].Address(), buffer.data(), buffer.size()); + buffer = ctx.ReadBuffer(1); const std::string dst_name = Common::StringFromBuffer(buffer); LOG_DEBUG(Service_FS, "called. file '{}' to file '{}'", src_name, dst_name); |