From 2864c06207ea3cd76e8a1d8980fb0a6a410a9804 Mon Sep 17 00:00:00 2001 From: Fenrir Date: Sun, 11 Feb 2024 18:39:08 -0700 Subject: [PATCH] Don't include nul terminator when passing string data back to Rust --- ctru-rs/src/applets/swkbd.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ctru-rs/src/applets/swkbd.rs b/ctru-rs/src/applets/swkbd.rs index cf763b2..c6ad7d8 100644 --- a/ctru-rs/src/applets/swkbd.rs +++ b/ctru-rs/src/applets/swkbd.rs @@ -809,12 +809,12 @@ impl SoftwareKeyboard { SWKBD_SHARED_MEM .add((*swkbd).text_offset as _) .cast::(), - (*swkbd).text_length as usize + 1, + (*swkbd).text_length as usize, )) .unwrap() } } else { - widestring::utf16str!("\0") + widestring::utf16str!("") }; buf.extend(text16.encode_utf8());