7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-07 18:25:31 +00:00

ODB++: fix format error caused by empty PKG name when some AD projects import

This commit is contained in:
Eric 2025-02-17 17:44:54 +08:00
parent d53bf5d6cf
commit 1968716542

View File

@ -212,6 +212,9 @@ void EDA_DATA::AddPackage( const FOOTPRINT* aFp )
size_t pkg_index = packages_map.size();
wxString fp_name = fp->GetFPID().GetLibItemName().wx_str();
ODB::RemoveWhitespace( fp_name );
if( fp_name.IsEmpty() )
fp_name = wxS( "__" );
auto [iter, success] = packages_map.emplace( hash, PACKAGE( pkg_index, fp_name ) );