Skip to content

Commit

Permalink
Use array len instead of libctru constant
Browse files Browse the repository at this point in the history
  • Loading branch information
FenrirWolf committed Mar 27, 2024
1 parent 476a812 commit ad8b328
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ctru-rs/src/applets/swkbd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down

0 comments on commit ad8b328

Please sign in to comment.