소스 검색

[mucurses] Attempt to fix test for empty string

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 8 년 전
부모
커밋
d29e2d551c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      src/hci/mucurses/slk.c

+ 1
- 1
src/hci/mucurses/slk.c 파일 보기

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

Loading…
취소
저장