Browse Source

Don't include nul terminator when passing string data back to Rust

pull/157/head
Fenrir 10 months ago
parent
commit
2864c06207
  1. 4
      ctru-rs/src/applets/swkbd.rs

4
ctru-rs/src/applets/swkbd.rs

@ -809,12 +809,12 @@ impl SoftwareKeyboard {
SWKBD_SHARED_MEM SWKBD_SHARED_MEM
.add((*swkbd).text_offset as _) .add((*swkbd).text_offset as _)
.cast::<u16>(), .cast::<u16>(),
(*swkbd).text_length as usize + 1, (*swkbd).text_length as usize,
)) ))
.unwrap() .unwrap()
} }
} else { } else {
widestring::utf16str!("\0") widestring::utf16str!("")
}; };
buf.extend(text16.encode_utf8()); buf.extend(text16.encode_utf8());

Loading…
Cancel
Save