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

Origin commit data
------------------
Branch: ni/coolstream
Commit: 6a48922350
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-05-29 (Wed, 29 May 2013)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2013-05-29 15:33:21 +02:00
parent 78bb53b641
commit 29fd5bcdcd
11 changed files with 22 additions and 2 deletions

View File

@@ -2128,8 +2128,10 @@ void CChannelList::paint()
const int sb = height - theight - footerHeight; // paint scrollbar over full height of main box
frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1);
const int sbc= ((chanlist.size()- 1)/ listmaxshow)+ 1;
int sbc= ((chanlist.size()- 1)/ listmaxshow)+ 1;
const int sbs= (selected/listmaxshow);
if (sbc < 1)
sbc = 1;
frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs*(sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3);
showChannelLogo();