Ver código fonte

[mucurses] Attempt to fix test for empty string

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 7 anos atrás
pai
commit
d29e2d551c
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1
    1
      src/hci/mucurses/slk.c

+ 1
- 1
src/hci/mucurses/slk.c Ver arquivo

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

Carregando…
Cancelar
Salvar