mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
neutrino: fix possible div-by-zero in scrollbar calculation
This commit is contained in:
committed by
Jacek Jendrzej
parent
5420e509da
commit
a33086568b
@@ -476,6 +476,9 @@ void CBookmarkManager::paint()
|
||||
frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1);
|
||||
|
||||
int sbc= ((bookmarks.size()- 1)/ listmaxshow)+ 1;
|
||||
if (sbc < 1)
|
||||
sbc = 1;
|
||||
|
||||
float sbh= (sb- 4)/ sbc;
|
||||
|
||||
frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ int(page_nr * sbh) , 11, int(sbh), COL_MENUCONTENT_PLUS_3);
|
||||
|
Reference in New Issue
Block a user