Skip to content
Permalink
Browse files

fix string truncation with spatialite and memory layers (followup 065…

  • Loading branch information
jef-n committed Feb 18, 2015
1 parent d8083b9 commit b6dd1e411927fc31880862bad99e7fef12a0ae60
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/qgsfield.cpp
@@ -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;
}

0 comments on commit b6dd1e4

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