summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/am
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2022-11-21 17:31:18 +0100
committerLiam <byteslice@airmail.cc>2022-11-23 04:22:28 +0100
commit9737615948d431cf56826f3c109bbc0fef7b4d10 (patch)
tree9d4742bf8f2b64b9a5b30ae33b105a5e9344ab3b /src/core/hle/service/am
parentMerge pull request #9279 from liamwhite/this-would-have-never-happened-in-rust (diff)
downloadyuzu-9737615948d431cf56826f3c109bbc0fef7b4d10.tar
yuzu-9737615948d431cf56826f3c109bbc0fef7b4d10.tar.gz
yuzu-9737615948d431cf56826f3c109bbc0fef7b4d10.tar.bz2
yuzu-9737615948d431cf56826f3c109bbc0fef7b4d10.tar.lz
yuzu-9737615948d431cf56826f3c109bbc0fef7b4d10.tar.xz
yuzu-9737615948d431cf56826f3c109bbc0fef7b4d10.tar.zst
yuzu-9737615948d431cf56826f3c109bbc0fef7b4d10.zip
Diffstat (limited to 'src/core/hle/service/am')
-rw-r--r--src/core/hle/service/am/am.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
index 8ea7fd760..22999c942 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -1125,7 +1125,7 @@ void IStorageAccessor::Write(Kernel::HLERequestContext& ctx) {
const u64 offset{rp.Pop<u64>()};
const std::vector<u8> data{ctx.ReadBuffer()};
- const std::size_t size{std::min(data.size(), backing.GetSize() - offset)};
+ const std::size_t size{std::min<u64>(data.size(), backing.GetSize() - offset)};
LOG_DEBUG(Service_AM, "called, offset={}, size={}", offset, size);
@@ -1149,7 +1149,7 @@ void IStorageAccessor::Read(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const u64 offset{rp.Pop<u64>()};
- const std::size_t size{std::min(ctx.GetWriteBufferSize(), backing.GetSize() - offset)};
+ const std::size_t size{std::min<u64>(ctx.GetWriteBufferSize(), backing.GetSize() - offset)};
LOG_DEBUG(Service_AM, "called, offset={}, size={}", offset, size);