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

Origin commit data
------------------
Commit: a33086568b
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-05-29 (Wed, 29 May 2013)
This commit is contained in:
Stefan Seyfried
2013-05-29 15:33:21 +02:00
committed by Jacek Jendrzej
parent 1dc21b9656
commit 6210ac6726
11 changed files with 28 additions and 2 deletions

View File

@@ -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
}