From 120f0cf79cb920d592fee3bd99fe231b20d5cfee Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Tue, 7 Jul 2026 22:34:57 +1000 Subject: [PATCH] Reset tombstoned output record paths Ensure pooled output records replace tombstone path instances before clearing them, avoiding reuse of the sentinel collection. --- src/PolygonClipper/VertexPoolList.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PolygonClipper/VertexPoolList.cs b/src/PolygonClipper/VertexPoolList.cs index 0f69d8c..61ad829 100644 --- a/src/PolygonClipper/VertexPoolList.cs +++ b/src/PolygonClipper/VertexPoolList.cs @@ -101,6 +101,7 @@ public OutputRecord Add() outputRecord.BackEdge = null; outputRecord.Points = null; outputRecord.Bounds = default; + outputRecord.Path = outputRecord.Path == Tombstone ? [] : outputRecord.Path; outputRecord.Path.Clear(); outputRecord.Splits?.Clear(); outputRecord.RecursiveSplit = null;