Careful of unspecified start reference.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/22552
This commit is contained in:
Jeff Young
2025-12-19 13:19:10 +00:00
parent 1f628faaec
commit 1aed1d5f2f
+1 -1
View File
@@ -190,7 +190,7 @@ REFDES_PREFIX_INFO* DIALOG_BOARD_REANNOTATE::GetOrBuildRefDesInfo( const wxStrin
// Wasn't in the info array so add it
REFDES_PREFIX_INFO newtype;
newtype.RefDesPrefix = aRefDesPrefix;
newtype.LastUsedRefDes = aStartRefDes - 1;
newtype.LastUsedRefDes = std::max( aStartRefDes - 1, 0 );
m_refDesPrefixInfos.push_back( newtype );
return &m_refDesPrefixInfos.back();