git-svn-id: http://svn.osgeo.org/qgis/trunk@15847 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
jef 2011-04-28 23:54:24 +00:00
parent 2f1cf5b396
commit 5160fefdc1

View File

@ -3366,12 +3366,8 @@ bool QgsSpatiaLiteProvider::addFeatures( QgsFeatureList & flist )
else if ( type == QVariant::String )
{
// binding a TEXT value
QString txt = it->toString();
int len = txt.toUtf8().length() + 1;
char *vl = new char [len];
strcpy( vl, txt.toUtf8().constData() );
sqlite3_bind_text( stmt, ++ia, vl, len, SQLITE_TRANSIENT );
delete [] vl;
QByteArray ba = it->toString().toUtf8();
sqlite3_bind_text( stmt, ++ia, ba.constData(), ba.size(), SQLITE_TRANSIENT );
}
else
{