mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
glcd: fix possible division by zero
This commit is contained in:
@@ -207,6 +207,7 @@ void cGLCD::Exec()
|
|||||||
GLCD::cFont font_tmp;
|
GLCD::cFont font_tmp;
|
||||||
|
|
||||||
int fw = font_epg.Width(Epg);
|
int fw = font_epg.Width(Epg);
|
||||||
|
fw = (fw == 0) ? 1: fw;
|
||||||
font_tmp.LoadFT2(t.glcd_font, "UTF-8", fontsize_epg * bitmap->Width() / fw);
|
font_tmp.LoadFT2(t.glcd_font, "UTF-8", fontsize_epg * bitmap->Width() / fw);
|
||||||
fw = font_tmp.Width(Epg);
|
fw = font_tmp.Width(Epg);
|
||||||
int fh = font_tmp.Height(Epg);
|
int fh = font_tmp.Height(Epg);
|
||||||
|
Reference in New Issue
Block a user