diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2021-08-01 18:47:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-01 18:47:47 +0200 |
commit | d20bcb7fafb599891b0729d8231ce8247e0179d3 (patch) | |
tree | 711e0abddf6629d6e64c660414990be578fcc0e4 /src | |
parent | Merge pull request #6720 from ameerj/vk-screenshot (diff) | |
parent | service: set: Correct copy amount in GetAvailableLanguageCodes (diff) | |
download | yuzu-d20bcb7fafb599891b0729d8231ce8247e0179d3.tar yuzu-d20bcb7fafb599891b0729d8231ce8247e0179d3.tar.gz yuzu-d20bcb7fafb599891b0729d8231ce8247e0179d3.tar.bz2 yuzu-d20bcb7fafb599891b0729d8231ce8247e0179d3.tar.lz yuzu-d20bcb7fafb599891b0729d8231ce8247e0179d3.tar.xz yuzu-d20bcb7fafb599891b0729d8231ce8247e0179d3.tar.zst yuzu-d20bcb7fafb599891b0729d8231ce8247e0179d3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/set/set.cpp | 3 |
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); |