From 1fa5e43597e3107ba0bcdcec0f34ebc8f100373f Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 22 Aug 2021 03:24:51 +0100 Subject: [PATCH] Fix some dodgy logic in clearance overrides. --- pcbnew/drc/drc_engine.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pcbnew/drc/drc_engine.cpp b/pcbnew/drc/drc_engine.cpp index 59e6b0bbc2..57209231f8 100644 --- a/pcbnew/drc/drc_engine.cpp +++ b/pcbnew/drc/drc_engine.cpp @@ -792,7 +792,9 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO if( ac && !b_is_non_copper ) { - if( int overrideA = ac->GetLocalClearanceOverrides( nullptr ) > 0 ) + int overrideA = ac->GetLocalClearanceOverrides( nullptr ); + + if( overrideA > 0 ) { REPORT( "" ) REPORT( wxString::Format( _( "Local override on %s; clearance: %s." ), @@ -805,7 +807,9 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO if( bc && !a_is_non_copper ) { - if( int overrideB = bc->GetLocalClearanceOverrides( nullptr ) > 0 ) + int overrideB = bc->GetLocalClearanceOverrides( nullptr ); + + if( overrideB > 0 ) { REPORT( "" ) REPORT( wxString::Format( _( "Local override on %s; clearance: %s." ),