Skip to content

Commit

Permalink
try lenght not size
Browse files Browse the repository at this point in the history
  • Loading branch information
roya0045 committed Nov 12, 2020
1 parent 41eb79b commit 892e00e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/expression/qgsexpressionfunction.cpp
Expand Up @@ -5325,7 +5325,8 @@ static QVariant fcnArrayGet( const QVariantList &values, const QgsExpressionCont
const QVariantList list = QgsExpressionUtils::getListValue( values.at( 0 ), parent );
const int pos = QgsExpressionUtils::getNativeIntValue( values.at( 1 ), parent );
if ( pos >= list.length() ) return QVariant();
if ( pos < 0 && ( list.size() + pos ) >= 0 ) return list.at( list.size() + pos );
if ( pos < 0 && ( list.length() + pos ) >= 0 )
return list.at( list.length() + pos );
return list.at( pos );
}

Expand Down

0 comments on commit 892e00e

Please sign in to comment.