On 08.04.2016 23:35, Graeme Geldenhuys wrote:
As note: If I compile with -Cr, I got a Runerror 201 in unit fpparsettf
>on line 810.
I made a note of that, thanks.
The attached patch fixes the range error.
Ondrej
Index: fpparsettf.pp
===================================================================
--- fpparsettf.pp (revision 33453)
+++ fpparsettf.pp (working copy)
@@ -807,7 +807,8 @@
FMissingWidth := Widths[Chars[CharCodes^[32]]].AdvanceWidth; // Char(32) -
Space character
for I:=0 to 255 do
begin
- if (Widths[Chars[CharCodes^[i]]].AdvanceWidth> 0) and (CharNames^[i]<>
'.notdef') then
+ if (CharCodes^[i]>=0) and (CharCodes^[i]<=High(Chars))
+ and (Widths[Chars[CharCodes^[i]]].AdvanceWidth> 0) and (CharNames^[i]<>
'.notdef') then
CharWidth[I]:= ToNatural(Widths[Chars[CharCodes^[I]]].AdvanceWidth)
else
CharWidth[I]:= FMissingWidth;
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus