Browse Source

Fix yet another off-by-one error

pull/157/head
Fenrir 10 months ago
parent
commit
271d1b598a
  1. 2
      ctru-rs/src/applets/swkbd.rs

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

@ -862,7 +862,7 @@ impl SoftwareKeyboard {
let text16 = unsafe { let text16 = unsafe {
widestring::Utf16Str::from_slice_unchecked(std::slice::from_raw_parts( widestring::Utf16Str::from_slice_unchecked(std::slice::from_raw_parts(
SWKBD_SHARED_MEM.add(swkbd.text_offset as _).cast(), SWKBD_SHARED_MEM.add(swkbd.text_offset as _).cast(),
swkbd.text_length as usize + 1, swkbd.text_length as _,
)) ))
}; };

Loading…
Cancel
Save