🚨 Skip empty font info tables
A truncated font resource indexed an empty array on load.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user