Fixed a condition in LIB_ITEMS_LIST::operator[]

Fixes: lp:1714110
* https://bugs.launchpad.net/kicad/+bug/1714110
This commit is contained in:
Seth Hillbrand 2017-09-07 00:43:22 +02:00 committed by Maciej Suminski
parent 8c70681b31
commit 3b086360b8
1 changed files with 1 additions and 1 deletions

View File

@ -168,7 +168,7 @@ const LIB_ITEM& LIB_ITEMS_LIST::operator[]( unsigned int aIdx ) const
for( const auto& type : m_data )
{
if( counter + type.second.size() < aIdx )
if( aIdx < counter + type.second.size() )
return type.second[aIdx - counter];
else
counter += type.second.size();