mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
fix string truncation with spatialite and memory layers (followup 065d190d)
This commit is contained in:
parent
d8083b96ef
commit
b6dd1e4119
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user