diff options
author | bunnei <bunneidev@gmail.com> | 2020-01-26 06:17:49 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2020-02-06 05:06:50 +0100 |
commit | be5fcffb896d0ade4fe6f106210184556178af02 (patch) | |
tree | ef4d56cf576b897a0c21039263dc04ddcf8a0cb5 /src | |
parent | Merge pull request #3377 from ReinUsesLisp/bitset-vk (diff) | |
download | yuzu-be5fcffb896d0ade4fe6f106210184556178af02.tar yuzu-be5fcffb896d0ade4fe6f106210184556178af02.tar.gz yuzu-be5fcffb896d0ade4fe6f106210184556178af02.tar.bz2 yuzu-be5fcffb896d0ade4fe6f106210184556178af02.tar.lz yuzu-be5fcffb896d0ade4fe6f106210184556178af02.tar.xz yuzu-be5fcffb896d0ade4fe6f106210184556178af02.tar.zst yuzu-be5fcffb896d0ade4fe6f106210184556178af02.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/service/am/applets/software_keyboard.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/service/am/applets/software_keyboard.cpp b/src/core/hle/service/am/applets/software_keyboard.cpp index 748559cd0..ea266f8ed 100644 --- a/src/core/hle/service/am/applets/software_keyboard.cpp +++ b/src/core/hle/service/am/applets/software_keyboard.cpp @@ -119,7 +119,7 @@ void SoftwareKeyboard::WriteText(std::optional<std::u16string> text) { std::vector<u8> output_sub(SWKBD_OUTPUT_BUFFER_SIZE); if (config.utf_8) { - const u64 size = text->size() + 8; + const u64 size = text->size() + sizeof(u64); const auto new_text = Common::UTF16ToUTF8(*text); std::memcpy(output_sub.data(), &size, sizeof(u64)); @@ -130,7 +130,7 @@ void SoftwareKeyboard::WriteText(std::optional<std::u16string> text) { std::memcpy(output_main.data() + 4, new_text.data(), std::min(new_text.size(), SWKBD_OUTPUT_BUFFER_SIZE - 4)); } else { - const u64 size = text->size() * 2 + 8; + const u64 size = text->size() * 2 + sizeof(u64); std::memcpy(output_sub.data(), &size, sizeof(u64)); std::memcpy(output_sub.data() + 8, text->data(), std::min(text->size() * 2, SWKBD_OUTPUT_BUFFER_SIZE - 8)); |