Skip to content

Commit

Permalink
fix string truncation with spatialite and memory layers (followup 065…
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Feb 18, 2015
1 parent d8083b9 commit b6dd1e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/qgsfield.cpp
Expand Up @@ -157,9 +157,9 @@ bool QgsField::convertCompatible( QVariant& v ) const
return true;
}

if ( mType == QVariant::String && mLength >= 0 && v.toString().length() > mLength )
if ( mType == QVariant::String && mLength > 0 && v.toString().length() > mLength )
{
v = QVariant( mType );
v = v.toString().left( mLength );
return false;
}

Expand Down

0 comments on commit b6dd1e4

Please sign in to comment.