From 557ad5544fbaa893936d31e44038c3570030a798 Mon Sep 17 00:00:00 2001 From: Matt Fleming Date: Thu, 28 Feb 2013 15:07:19 +0000 Subject: readconfig: Don't display "(null)" labels when hitting TAB It is entirely legitimate for a menu entry to have a NULL label or displayname. Since these entries are not used for execution, skip displaying them in print_labels() when hitting the TAB key. Reported-by: Bernd Blaauw Signed-off-by: Matt Fleming --- com32/elflink/ldlinux/readconfig.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/com32/elflink/ldlinux/readconfig.c b/com32/elflink/ldlinux/readconfig.c index 036a1df5..9d50c2f3 100644 --- a/com32/elflink/ldlinux/readconfig.c +++ b/com32/elflink/ldlinux/readconfig.c @@ -473,6 +473,9 @@ void print_labels(const char *prefix, size_t len) printf("\n"); for (me = all_entries; me; me = me->next ) { + if (!me->label) + continue; + if (!strncmp(prefix, me->label, len)) printf(" %s", me->label); } -- cgit v1.2.1