mirror of
https://github.com/lvgl/lvgl.git
synced 2025-02-04 07:13:00 +08:00
fix(dropdown): reset char_i = 0, avoid access overflow (#4589)
This commit is contained in:
parent
5c134a2bfb
commit
eea960e76b
@ -414,6 +414,7 @@ int32_t lv_dropdown_get_option_index(lv_obj_t * obj, const char * option)
|
|||||||
memcmp(start, option, option_len) == 0) return opt_i; /*cannot match exactly unless they are the same length*/
|
memcmp(start, option, option_len) == 0) return opt_i; /*cannot match exactly unless they are the same length*/
|
||||||
start = &start[char_i];
|
start = &start[char_i];
|
||||||
if(start[0] == '\n') start++;
|
if(start[0] == '\n') start++;
|
||||||
|
char_i = 0;
|
||||||
opt_i++;
|
opt_i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user