diff options
author | Lioncash <mathew1800@gmail.com> | 2019-11-26 20:10:49 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-11-27 03:55:37 +0100 |
commit | 536fc7f0ea77e08d68c760f387c307d258804e3b (patch) | |
tree | e979df531bf1222788cc26144531c6e6f5cca1d1 /src/core/hle/service/filesystem | |
parent | core/memory: Move memory read/write implementation functions into an anonymous namespace (diff) | |
download | yuzu-536fc7f0ea77e08d68c760f387c307d258804e3b.tar yuzu-536fc7f0ea77e08d68c760f387c307d258804e3b.tar.gz yuzu-536fc7f0ea77e08d68c760f387c307d258804e3b.tar.bz2 yuzu-536fc7f0ea77e08d68c760f387c307d258804e3b.tar.lz yuzu-536fc7f0ea77e08d68c760f387c307d258804e3b.tar.xz yuzu-536fc7f0ea77e08d68c760f387c307d258804e3b.tar.zst yuzu-536fc7f0ea77e08d68c760f387c307d258804e3b.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 5874ed6bd..89e1957f9 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); |