Skip to content

Commit

Permalink
Update src/core/qgsfeature.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: Matthias Kuhn <matthias@opengis.ch>
  • Loading branch information
nyalldawson and m-kuhn committed Dec 3, 2021
1 parent b97c399 commit a9e9c5e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/qgsfeature.cpp
Expand Up @@ -135,9 +135,10 @@ QVariantMap QgsFeature::attributeMap() const
if ( fieldSize != attributeSize )
{
QgsDebugMsg( QStringLiteral( "Attribute size (%1) does not match number of fields (%2)" ).arg( attributeSize ).arg( fieldSize ) );
return QVariantMap();
}

for ( int i = 0; i < attributeSize && i < fieldSize; ++i )
for ( int i = 0; i < attributeSize; ++i )
{
res[d->fields.at( i ).name()] = d->attributes.at( i );
}
Expand Down

0 comments on commit a9e9c5e

Please sign in to comment.