Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix #3782
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15847 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Apr 28, 2011
1 parent c23ec2d commit b4c7383
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/providers/spatialite/qgsspatialiteprovider.cpp
Expand Up @@ -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
{
Expand Down

0 comments on commit b4c7383

Please sign in to comment.