neutrino: fix possible div-by-zero in scrollbar calculation

This commit is contained in:
Stefan Seyfried
2013-05-29 15:33:21 +02:00
parent eb9eba8914
commit 6a48922350
11 changed files with 22 additions and 2 deletions

View File

@@ -618,7 +618,7 @@ void CBouquetList::paint()
int sb = fheight* listmaxshow;
frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1);
int sbc= ((bsize - 1)/ listmaxshow)+ 1;
int sbc= ((bsize - 1)/ listmaxshow)+ 1; /* bsize is > 0, so sbc is also > 0 */
int sbs= (selected/listmaxshow);
frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs * (sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3);