lib/config: Ignore spaces at beginning of entry name
diff --git a/common/lib/config.c b/common/lib/config.c
index 15ff5e51..66d5112e 100644
--- a/common/lib/config.c
+++ b/common/lib/config.c
@@ -108,7 +108,12 @@ static struct menu_entry *create_menu_tree(struct menu_entry *parent,
bool default_expanded = name[current_depth] == '+';
- strcpy(entry->name, name + current_depth + default_expanded);
+ char *n = &name[current_depth + default_expanded];
+ while (*n == ' ') {
+ n++;
+ }
+
+ strcpy(entry->name, n);
entry->parent = parent;
size_t entry_size;
