summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2021-08-01 17:59:52 +0200
committerMorph <39850852+Morph1984@users.noreply.github.com>2021-08-01 17:59:52 +0200
commit3b4d427993fe8df5ea531169590aecf7be868870 (patch)
tree711e0abddf6629d6e64c660414990be578fcc0e4 /src/core/hle/service
parentMerge pull request #6720 from ameerj/vk-screenshot (diff)
downloadyuzu-3b4d427993fe8df5ea531169590aecf7be868870.tar
yuzu-3b4d427993fe8df5ea531169590aecf7be868870.tar.gz
yuzu-3b4d427993fe8df5ea531169590aecf7be868870.tar.bz2
yuzu-3b4d427993fe8df5ea531169590aecf7be868870.tar.lz
yuzu-3b4d427993fe8df5ea531169590aecf7be868870.tar.xz
yuzu-3b4d427993fe8df5ea531169590aecf7be868870.tar.zst
yuzu-3b4d427993fe8df5ea531169590aecf7be868870.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/set/set.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/hle/service/set/set.cpp b/src/core/hle/service/set/set.cpp
index f2e2e8306..8795eb6b7 100644
--- a/src/core/hle/service/set/set.cpp
+++ b/src/core/hle/service/set/set.cpp
@@ -85,7 +85,8 @@ 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 copy_amount = std::min(requested_amount, max_entries);
+ 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);
ctx.WriteBuffer(available_language_codes.data(), copy_size);