mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
neutrino: fix possible div-by-zero in scrollbar calculation
This commit is contained in:
committed by
Jacek Jendrzej
parent
5420e509da
commit
a33086568b
@@ -263,6 +263,8 @@ void CEpgData::showText( int startPos, int ypos )
|
||||
|
||||
int sbc = ((textSize - 1)/ medlinecount) + 1;
|
||||
int sbs= (startPos+ 1)/ medlinecount;
|
||||
if (sbc < 1)
|
||||
sbc = 1;
|
||||
frameBuffer->paintBoxRel(sx+ ox- 15, ypos, 15, sb, COL_MENUCONTENT_PLUS_1); // scrollbar bg
|
||||
frameBuffer->paintBoxRel(sx+ ox- 13, ypos+ 2+ sbs*(sb-4)/sbc , 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3); // scrollbar
|
||||
}
|
||||
|
Reference in New Issue
Block a user