Pārlūkot izejas kodu

[mucurses] Avoid potential division by zero

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 8 gadus atpakaļ
vecāks
revīzija
c20da4fc5c
1 mainītis faili ar 1 papildinājumiem un 2 dzēšanām
  1. 1
    2
      src/hci/mucurses/slk.c

+ 1
- 2
src/hci/mucurses/slk.c Parādīt failu

269
 		slks->spaces[0] = 3; slks->spaces[1] = 7;
269
 		slks->spaces[0] = 3; slks->spaces[1] = 7;
270
 		break;
270
 		break;
271
 	default:
271
 	default:
272
-		nblocks = 0; nmaj = 0; nmin = 0;
273
-		break;
272
+		return ERR;
274
 	}
273
 	}
275
 
274
 
276
 	// determine maximum label length and major space size
275
 	// determine maximum label length and major space size

Notiek ielāde…
Atcelt
Saglabāt