Skip to content

Commit

Permalink
ta: fix max-length bug in pwd mode
Browse files Browse the repository at this point in the history
  • Loading branch information
kisvegabor committed Jan 11, 2020
1 parent f31ba6c commit 5192805
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lv_objx/lv_ta.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5192805

Please sign in to comment.