From ad8b328387458843682ba766eff7b171ef467658 Mon Sep 17 00:00:00 2001 From: Fenrir Date: Tue, 26 Mar 2024 18:12:58 -0600 Subject: [PATCH] Use array len instead of libctru constant --- ctru-rs/src/applets/swkbd.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() {