Ensure algorithmic safety (potentially KICAD-9RN).

(cherry picked from commit 39f6b30ee7)
This commit is contained in:
Jeff Young
2025-07-08 08:44:22 +01:00
parent ccc25e4cc7
commit bd5b98cb46
+4
View File
@@ -51,6 +51,10 @@ bool DRC_CACHE_GENERATOR::Run()
if( m_drcEngine->QueryWorstConstraint( PHYSICAL_HOLE_CLEARANCE_CONSTRAINT, worstConstraint ) )
largestPhysicalClearance = std::max( largestPhysicalClearance, worstConstraint.GetValue().Min() );
// Ensure algorithmic safety
largestClearance = std::min( largestClearance, INT_MAX / 3 );
largestPhysicalClearance = std::min( largestPhysicalClearance, INT_MAX / 3 );
std::set<ZONE*> allZones;
for( ZONE* zone : m_board->Zones() )