diff --git a/ctru-rs/src/applets/swkbd.rs b/ctru-rs/src/applets/swkbd.rs index 6a42ebd..c3b49fc 100644 --- a/ctru-rs/src/applets/swkbd.rs +++ b/ctru-rs/src/applets/swkbd.rs @@ -545,7 +545,7 @@ impl SoftwareKeyboard { for (idx, code_unit) in text .encode_utf16() - .take(ctru_sys::SWKBD_MAX_BUTTON_TEXT_LEN as _) + .take(button_text.len() - 1) .chain(once(0)) .enumerate() {