aboutsummaryrefslogtreecommitdiffstats
path: root/com32/elflink
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2013-02-28 15:07:19 +0000
committerMatt Fleming <matt.fleming@intel.com>2013-03-07 12:17:55 +0000
commit557ad5544fbaa893936d31e44038c3570030a798 (patch)
treee914157c7719457bdcbdbd99904ff7c4ae4e5542 /com32/elflink
parent5447ef821c24b526079ef785d2454ed0efff3e2b (diff)
downloadsyslinux-557ad5544fbaa893936d31e44038c3570030a798.tar.gz
syslinux-557ad5544fbaa893936d31e44038c3570030a798.tar.xz
syslinux-557ad5544fbaa893936d31e44038c3570030a798.zip
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 <bblaauw@home.nl> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'com32/elflink')
-rw-r--r--com32/elflink/ldlinux/readconfig.c3
1 files changed, 3 insertions, 0 deletions
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);
}