Skip to content
Permalink
Browse files

try lenght not size

  • Loading branch information
roya0045 committed Nov 12, 2020
1 parent 41eb79b commit 892e00e0572be5a98fb03348e9bcc323f45b0472
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/core/expression/qgsexpressionfunction.cpp
@@ -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 );
}

0 comments on commit 892e00e

Please sign in to comment.
You can’t perform that action at this time.