Fixed a condition in LIB_ITEMS_LIST::operator[]
Fixes: lp:1714110 * https://bugs.launchpad.net/kicad/+bug/1714110
This commit is contained in:
parent
8c70681b31
commit
3b086360b8
|
@ -168,7 +168,7 @@ const LIB_ITEM& LIB_ITEMS_LIST::operator[]( unsigned int aIdx ) const
|
||||||
|
|
||||||
for( const auto& type : m_data )
|
for( const auto& type : m_data )
|
||||||
{
|
{
|
||||||
if( counter + type.second.size() < aIdx )
|
if( aIdx < counter + type.second.size() )
|
||||||
return type.second[aIdx - counter];
|
return type.second[aIdx - counter];
|
||||||
else
|
else
|
||||||
counter += type.second.size();
|
counter += type.second.size();
|
||||||
|
|
Loading…
Reference in New Issue