🚨 Skip empty font info tables

A truncated font resource indexed an empty array on load.
This commit is contained in:
2026-11-15 22:06:51 +01:00
parent c6e1a10d3b
commit ee0667aff3
+1
View File
@@ -185,6 +185,7 @@ begin
AFontInfo.Read(FSpaceWidth, SizeOf(FSpaceWidth));
SetLength(FFontInfo, (AFontInfo.Size - AFontInfo.Position) div
SizeOf(TFontInfo));
if Length(FFontInfo) > 0 then
AFontInfo.Read(FFontInfo[0], Length(FFontInfo) * SizeOf(TFontInfo));
end;