Fix for IndexOutOfRangeException exception

Fixes issue: https://github.com/UglyToad/PdfPig/issues/954
This commit is contained in:
GrabzIt
2024-12-12 13:17:48 +00:00
committed by BobLd
parent a2ae1f16d6
commit 952a07ef41

View File

@@ -83,7 +83,7 @@
private ushort[] MergeContourEndPoints(IGlyphDescription glyph)
{
var destinationLastEndPoint = EndPointsOfContours[EndPointsOfContours.Length - 1] + 1;
var destinationLastEndPoint = (EndPointsOfContours.Length > 0 ? EndPointsOfContours[EndPointsOfContours.Length - 1] : 0) + 1;
var endPoints = new ushort[EndPointsOfContours.Length + glyph.EndPointsOfContours.Length];