mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-06 21:25:03 -05:00
FS#13695: Fix crash in on-screen keyboard with codepoints > 0x7f
We were passing a utf8 byte sequence into a function expecting the actual codepoint value. ...This bug has been around approximately forever. Change-Id: I3f1d8b2508e7fc830ad9ed10bca3c3329c96851c
This commit is contained in:
parent
1bc6b450b9
commit
c208b84585
1 changed files with 3 additions and 1 deletions
|
|
@ -765,7 +765,9 @@ int kbd_input(char* text, int buflen, ucschar_t *kbd)
|
||||||
else if (state.changed == CHANGED_CURSOR)
|
else if (state.changed == CHANGED_CURSOR)
|
||||||
{
|
{
|
||||||
int c = utf8seek(state.text, state.editpos);
|
int c = utf8seek(state.text, state.editpos);
|
||||||
kbd_spellchar(state.text[c]);
|
ucschar_t ch;
|
||||||
|
utf8decode(&state.text[c], &ch);
|
||||||
|
kbd_spellchar(ch);
|
||||||
}
|
}
|
||||||
else if (state.changed == CHANGED_TEXT)
|
else if (state.changed == CHANGED_TEXT)
|
||||||
talk_spell(state.text, false); /* speak revised text */
|
talk_spell(state.text, false); /* speak revised text */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue