summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/set
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2022-11-23 19:25:14 +0100
committerLioncash <mathew1800@gmail.com>2022-11-23 19:43:20 +0100
commit97f273e94e83a679f42faa9c81916a1c058112e1 (patch)
treee2a2777ae3bec31b544516988fae36e8080150ff /src/core/hle/service/set
parenthle_ipc: Add helper functions for getting number of buffer elements (diff)
downloadyuzu-97f273e94e83a679f42faa9c81916a1c058112e1.tar
yuzu-97f273e94e83a679f42faa9c81916a1c058112e1.tar.gz
yuzu-97f273e94e83a679f42faa9c81916a1c058112e1.tar.bz2
yuzu-97f273e94e83a679f42faa9c81916a1c058112e1.tar.lz
yuzu-97f273e94e83a679f42faa9c81916a1c058112e1.tar.xz
yuzu-97f273e94e83a679f42faa9c81916a1c058112e1.tar.zst
yuzu-97f273e94e83a679f42faa9c81916a1c058112e1.zip
Diffstat (limited to 'src/core/hle/service/set')
-rw-r--r--src/core/hle/service/set/set.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/hle/service/set/set.cpp b/src/core/hle/service/set/set.cpp
index f761c2da4..4f1a8d6b7 100644
--- a/src/core/hle/service/set/set.cpp
+++ b/src/core/hle/service/set/set.cpp
@@ -83,7 +83,7 @@ void PushResponseLanguageCode(Kernel::HLERequestContext& ctx, std::size_t num_la
}
void GetAvailableLanguageCodesImpl(Kernel::HLERequestContext& ctx, std::size_t max_entries) {
- const std::size_t requested_amount = ctx.GetWriteBufferSize() / sizeof(LanguageCode);
+ const std::size_t requested_amount = ctx.GetWriteBufferNumElements<LanguageCode>();
const std::size_t max_amount = std::min(requested_amount, max_entries);
const std::size_t copy_amount = std::min(available_language_codes.size(), max_amount);
const std::size_t copy_size = copy_amount * sizeof(LanguageCode);