menu: Fix maybe uninitialised issue with cur_len var
This commit is contained in:
parent
478b6f3806
commit
d73cd37834
@ -510,6 +510,7 @@ static size_t print_tree(size_t offset, size_t window, const char *shift, size_t
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
size_t cur_len = 0;
|
||||||
if (current_entry == NULL)
|
if (current_entry == NULL)
|
||||||
break;
|
break;
|
||||||
if (!no_print && base_index + max_entries < offset) {
|
if (!no_print && base_index + max_entries < offset) {
|
||||||
@ -519,7 +520,6 @@ static size_t print_tree(size_t offset, size_t window, const char *shift, size_t
|
|||||||
goto skip_line;
|
goto skip_line;
|
||||||
}
|
}
|
||||||
if (!no_print) print("%s", shift);
|
if (!no_print) print("%s", shift);
|
||||||
size_t cur_len = shift ? strlen(shift) : 0;
|
|
||||||
if (level) {
|
if (level) {
|
||||||
for (size_t i = level - 1; i > 0; i--) {
|
for (size_t i = level - 1; i > 0; i--) {
|
||||||
struct menu_entry *actual_parent = current_entry;
|
struct menu_entry *actual_parent = current_entry;
|
||||||
|
Loading…
Reference in New Issue
Block a user