From 94119b365db57dbbfd21234a3513d25756b510ce Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Wed, 10 Nov 2021 16:51:35 -0500 Subject: [PATCH] Pcbnew: fix assertion in footprint hashing algorithm. --- common/hash_eda.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/hash_eda.cpp b/common/hash_eda.cpp index 69c00351b0..7105c53ebf 100644 --- a/common/hash_eda.cpp +++ b/common/hash_eda.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2017 CERN - * Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors. * @author Maciej Suminski * * This program is free software; you can redistribute it and/or @@ -143,7 +143,9 @@ size_t hash_fp_item( const EDA_ITEM* aItem, int aFlags ) hash_combine( ret, shape->GetShape() ); hash_combine( ret, shape->GetWidth() ); hash_combine( ret, shape->IsFilled() ); - hash_combine( ret, shape->GetRadius() ); + + if( shape->GetShape() == SHAPE_T::ARC || shape->GetShape() == SHAPE_T::CIRCLE ) + hash_combine( ret, shape->GetRadius() ); if( aFlags & HASH_POS ) {