mirror of
https://github.com/lvgl/lvgl.git
synced 2025-02-04 07:13:00 +08:00
fix(ime): fix ime crash when input_char is too long (#6767)
Signed-off-by: lhdjply <lhdjply@126.com>
This commit is contained in:
parent
5809f0a870
commit
2d4517cd63
@ -707,7 +707,8 @@ static void lv_ime_pinyin_kb_event(lv_event_t * e)
|
|||||||
}
|
}
|
||||||
else if((pinyin_ime->mode == LV_IME_PINYIN_MODE_K26) && ((txt[0] >= 'a' && txt[0] <= 'z') || (txt[0] >= 'A' &&
|
else if((pinyin_ime->mode == LV_IME_PINYIN_MODE_K26) && ((txt[0] >= 'a' && txt[0] <= 'z') || (txt[0] >= 'A' &&
|
||||||
txt[0] <= 'Z'))) {
|
txt[0] <= 'Z'))) {
|
||||||
lv_strcat(pinyin_ime->input_char, txt);
|
uint16_t len = lv_strlen(pinyin_ime->input_char);
|
||||||
|
lv_snprintf(pinyin_ime->input_char + len, sizeof(pinyin_ime->input_char) - len, "%s", txt);
|
||||||
pinyin_input_proc(obj);
|
pinyin_input_proc(obj);
|
||||||
pinyin_ime->ta_count++;
|
pinyin_ime->ta_count++;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user