瀏覽代碼

[mucurses] Attempt to fix test for empty string

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 7 年之前
父節點
當前提交
d29e2d551c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      src/hci/mucurses/slk.c

+ 1
- 1
src/hci/mucurses/slk.c 查看文件

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

Loading…
取消
儲存