fix mis use of wstr_init

This commit is contained in:
lixianjing 2023-04-11 20:28:33 +08:00
parent 34f78eca15
commit d8f38d6708

View File

@ -1949,6 +1949,7 @@ static ret_t text_edit_insert_text_with_len(text_edit_t* text_edit, uint32_t off
return_value_if_fail(text_edit != NULL && text_edit->widget != NULL && text != NULL,
RET_BAD_PARAMS);
wstr_init(&s, 0);
wstr_set_utf8(&s, text);
ret = text_edit_insert_wtext_with_len(text_edit, offset, s.str, len);
wstr_reset(&s);