Fix crash when converting the font 00-Starmap_r400-8.bdf.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8203 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Magnus Holmgren 2005-12-08 19:25:15 +00:00
parent a547084b24
commit d8dcc25fdf

View file

@ -418,7 +418,8 @@ int bdf_read_header(FILE *fp, struct font* pf)
/* calc default char*/ /* calc default char*/
if (pf->defaultchar < 0 || if (pf->defaultchar < 0 ||
pf->defaultchar < firstchar || pf->defaultchar < firstchar ||
pf->defaultchar > limit_char ) pf->defaultchar > limit_char ||
pf->defaultchar > lastchar)
pf->defaultchar = firstchar; pf->defaultchar = firstchar;
/* calc font size (offset/width entries)*/ /* calc font size (offset/width entries)*/