Ensure we do not use a non existing pin in SIM_MODEL::MigrateSimModel()

Fixes #14522
https://gitlab.com/kicad/code/kicad/issues/14522
This commit is contained in:
jean-pierre charras 2023-04-12 09:36:07 +02:00
parent 9b0a92552a
commit f56e569a25
1 changed files with 1 additions and 1 deletions

View File

@ -1635,7 +1635,7 @@ void SIM_MODEL::MigrateSimModel( T_symbol& aSymbol, const PROJECT* aProject )
}
else
{
for( unsigned ii = 0; ii < pinIndexes.size(); ++ii )
for( unsigned ii = 0; ii < pinIndexes.size() && ii < sourcePins.size(); ++ii )
{
if( ii > 0 )
pinMap.Append( wxS( " " ) );