[MPlayer-dev-eng] [PATCH] repost: array initialization fix in font_load.c

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Jun 17 20:53:11 CEST 2004


Hi,

> This small patch fixes array initialization bug in font_load.c.
> 
> Number of entries of 'font', 'start', and 'width' arrays are all 65536
> as defined in libvo/font_load.h but only the first 512 entries were
> being initialized in read_font_desc() function.
> 
> This makes problem in displaying 2-bytes characters. Fixed this by
> changing 512 to 65536 in two places. The only file affected is
> libvo/font_load.c and I didn't see any side effects of this change.

this seems correct to me. Any comments?
I dislike the fact that it makes this function quite a bit slower (is 
this important?).
And I also saw that the font_desc_t struct (fontdesc.h, line 19) is more 
than 512k big! Wouldn't it make more sense to allocate the font, start, 
width etc. array dynamically with a size that makes sense (there are 
probably quite a few people that don't need unicode...)
Does anyone know this code?

Greetings,
Reimar Döffinger




More information about the MPlayer-dev-eng mailing list