diff options
author | Matt Fleming <matt.fleming@intel.com> | 2013-02-28 15:07:19 +0000 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2013-03-07 12:17:55 +0000 |
commit | 557ad5544fbaa893936d31e44038c3570030a798 (patch) | |
tree | e914157c7719457bdcbdbd99904ff7c4ae4e5542 | |
parent | 5447ef821c24b526079ef785d2454ed0efff3e2b (diff) | |
download | syslinux-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>
-rw-r--r-- | com32/elflink/ldlinux/readconfig.c | 3 |
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); } |