Skip to content

Commit

Permalink
spatialite provider: load 64bit integers (fixes #12785)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jun 9, 2015
1 parent 014f070 commit b736317
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/providers/spatialite/qgsspatialitefeatureiterator.cpp
Expand Up @@ -369,8 +369,16 @@ QVariant QgsSpatiaLiteFeatureIterator::getFeatureAttribute( sqlite3_stmt* stmt,
{
if ( sqlite3_column_type( stmt, ic ) == SQLITE_INTEGER )
{
// INTEGER value
return sqlite3_column_int( stmt, ic );
if ( type == QVariant::Int )
{
// INTEGER value
return sqlite3_column_int( stmt, ic );
}
else
{
// INTEGER value
return ( qint64 ) sqlite3_column_int64( stmt, ic );
}
}

if ( sqlite3_column_type( stmt, ic ) == SQLITE_FLOAT )
Expand Down

0 comments on commit b736317

Please sign in to comment.