From 271d1b598ab9a78b116a1a5c464f5a35119a800c Mon Sep 17 00:00:00 2001 From: Fenrir Date: Thu, 15 Feb 2024 11:49:33 -0700 Subject: [PATCH] Fix yet another off-by-one error --- 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 0f794ac..a47a7bc 100644 --- a/ctru-rs/src/applets/swkbd.rs +++ b/ctru-rs/src/applets/swkbd.rs @@ -862,7 +862,7 @@ impl SoftwareKeyboard { let text16 = unsafe { widestring::Utf16Str::from_slice_unchecked(std::slice::from_raw_parts( SWKBD_SHARED_MEM.add(swkbd.text_offset as _).cast(), - swkbd.text_length as usize + 1, + swkbd.text_length as _, )) };