summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/fs
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2016-03-03 19:05:50 +0100
committerSubv <subv2112@gmail.com>2016-03-20 20:52:50 +0100
commitf707026ac50c53716ac697ed439630d7728e9db6 (patch)
tree6e8b20bcfb2e72645a7f098c78574917f613452e /src/core/hle/service/fs
parentHLE/FS: Corrected some style concerns. (diff)
downloadyuzu-f707026ac50c53716ac697ed439630d7728e9db6.tar
yuzu-f707026ac50c53716ac697ed439630d7728e9db6.tar.gz
yuzu-f707026ac50c53716ac697ed439630d7728e9db6.tar.bz2
yuzu-f707026ac50c53716ac697ed439630d7728e9db6.tar.lz
yuzu-f707026ac50c53716ac697ed439630d7728e9db6.tar.xz
yuzu-f707026ac50c53716ac697ed439630d7728e9db6.tar.zst
yuzu-f707026ac50c53716ac697ed439630d7728e9db6.zip
Diffstat (limited to 'src/core/hle/service/fs')
-rw-r--r--src/core/hle/service/fs/archive.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/hle/service/fs/archive.cpp b/src/core/hle/service/fs/archive.cpp
index 676a2ee56..590697e76 100644
--- a/src/core/hle/service/fs/archive.cpp
+++ b/src/core/hle/service/fs/archive.cpp
@@ -103,14 +103,18 @@ ResultVal<bool> File::SyncRequest() {
u32 address = cmd_buff[5];
LOG_TRACE(Service_FS, "Read %s %s: offset=0x%llx length=%d address=0x%x",
GetTypeName().c_str(), GetName().c_str(), offset, length, address);
- if (offset + length > backend->GetSize())
- LOG_ERROR(Service_FS, "Reading from out of bounds offset=0x%llX length=0x%08X file_size=0x%llX", offset, length, backend->GetSize());
+
+ if (offset + length > backend->GetSize()) {
+ LOG_ERROR(Service_FS, "Reading from out of bounds offset=0x%llX length=0x%08X file_size=0x%llX",
+ offset, length, backend->GetSize());
+ }
+
ResultVal<size_t> read = backend->Read(offset, length, Memory::GetPointer(address));
if (read.Failed()) {
cmd_buff[1] = read.Code().raw;
return read.Code();
}
- cmd_buff[2] = static_cast<u32>(read.MoveFrom());
+ cmd_buff[2] = static_cast<u32>(*read);
break;
}
@@ -129,7 +133,7 @@ ResultVal<bool> File::SyncRequest() {
cmd_buff[1] = written.Code().raw;
return written.Code();
}
- cmd_buff[2] = static_cast<u32>(written.MoveFrom());
+ cmd_buff[2] = static_cast<u32>(*written);
break;
}