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 7, 2021
1 parent f47b7ef commit 8c66310
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 8c66310

Please sign in to comment.