From c9b1b5d1930e227e6f2245c33396ab2f28439db0 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Sun, 1 Aug 2021 20:00:17 +0200 Subject: [PATCH] early-access version 1956 --- README.md | 2 +- src/core/hle/service/set/set.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c0d8b1735..bc88af294 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 1955. +This is the source code for early-access 1956. ## Legal Notice diff --git a/src/core/hle/service/set/set.cpp b/src/core/hle/service/set/set.cpp index f2e2e8306..8795eb6b7 100755 --- 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);