ta: fix max-length bug in pwd mode

This commit is contained in:
Gabor Kiss-Vamosi
2020-01-11 16:02:23 +01:00
parent f31ba6cf6f
commit 51928059d2
+3 -1
View File
@@ -484,7 +484,9 @@ void lv_ta_set_text(lv_obj_t * ta, const char * txt)
if(lv_ta_get_accepted_chars(ta) || lv_ta_get_max_length(ta)) {
lv_label_set_text(ext->label, "");
lv_ta_set_cursor_pos(ta, LV_TA_CURSOR_LAST);
if(ext->pwd_mode != 0) {
ext->pwd_tmp[0] = '\0'; /*Clear the password too*/
}
uint32_t i = 0;
while(txt[i] != '\0') {
uint32_t c = lv_txt_encoded_next(txt, &i);