Re: [fltk.general] Cross-compiling Dillo to ARM
Hi Alan I just found a problem around src/x11/Font_xlfd:538last week Below is my solution void fltk::setfont(Font* font, float psize) { FontSize* f = current; IFont* t = (IFont*)font; // only integers supported right now (this can be improved): psize = int(psize+.5); unsigned size = unsigned(psize); // See if the current font is correct: if(f && f->encoding && encoding_) { <<-- Suggest to add some check if (font == current_font_ && psize == current_size_ && <<-- May crash here (f->encoding==encoding_ || (!encoding_ || !strcmp(f->encoding, encoding_)))) return; } current_font_ = font; current_size_ = psize; Steve ______________________________________________________________________________________________________ ¥I¶O€~®e¶qµL€W¡HYahoo!©_Œ¯¹q€l«Hœc2.0§K¶Oµ¹§A¡A«H¥ó¥Ã»·€£¥²§R¡I http://tw.mg0.mail.yahoo.com/dc/landing
Hi Steve, On 7/9/09, =AA=F8=AE=F5 =B1i <stevegigijoe@yahoo.com.tw> wrote:
Hi Alan
I just found a problem around src/x11/Font_xlfd:538last week Below is my solution
void fltk::setfont(Font* font, float psize) { FontSize* f =3D current; IFont* t =3D (IFont*)font;
// only integers supported right now (this can be improved): psize =3D int(psize+.5); unsigned size =3D unsigned(psize); // See if the current font is correct: if(f && f->encoding && encoding_) { <<-- Suggest t= o add some check if (font =3D=3D current_font_ && psize =3D=3D current_size_ && <<-- M= ay crash here (f->encoding=3D=3Dencoding_ || (!encoding_ || !strcmp(f->encoding, encoding_)))) return; } current_font_ =3D font; current_size_ =3D psize;
Great! Your work around fixed the issue! Thank you very much, Alan
participants (2)
-
acassis@gmail.com
-
stevegigijoe@yahoo.com.tw