Ensure algorithmic safety (potentially KICAD-9RN).

This commit is contained in:
Jeff Young
2025-07-01 21:34:30 -06:00
parent f5f59e797d
commit 39f6b30ee7
+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() )