DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2005
Version: 1.3-current


I agree that the check is correct/useful, because lineStr could be set to
NULL some line above this.

However, I can't see, how this if-condition could ever be true.
TMPFONTWIDTH is a constant that is defined to be 6. Thus, this condition
can never be true, and the compiler should optimize it away.

If the OP experienced crashes, then maybe because he changed more in the
original code (maybe he un-commented this
"//mFontStruct->max_bounds.width;" instead of using the constant
TMPFONTWIDTH ?). There are more occurrences of TMPFONTWIDTH instead of
mFontStruct->..., together with a FIXME comment in line 1757.

Note also: There's another diff in line 386ff:

@@ -386,6 +384,7 @@
   for (i = 0, mMaxsize = fl_height(textfont(), textsize()); i < mNStyles;
i++)
     mMaxsize = max(mMaxsize, fl_height(mStyleTable[i].font,
mStyleTable[i].size));
 
+  mMaxsize+=2; //simon was here
...


Link: http://www.fltk.org/str.php?L2005
Version: 1.3-current

_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to