]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[mucurses] Attempt to fix test for empty string
authorMichael Brown <mcb30@ipxe.org>
Tue, 21 Mar 2017 12:37:53 +0000 (14:37 +0200)
committerMichael Brown <mcb30@ipxe.org>
Tue, 21 Mar 2017 12:37:53 +0000 (14:37 +0200)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/hci/mucurses/slk.c

index 660eb65c0d63958171c0436c273ecd2cf33cb8ad..da35c5675efbc9edee2ad84a6ffdb36e2d721a88 100644 (file)
@@ -83,7 +83,7 @@ static void _print_label ( struct _softlabel sl ) {
        space_ch = ' ';
 
        // protect against gaps in the soft label keys array
-       if ( sl.label == NULL ) {
+       if ( ! sl.label[0] ) {
                memset( str, space_ch, (size_t)(slks->max_label_len) );
        } else {
                /* we need to pad the label with varying amounts of leading