Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
spatialite provider: load 64bit integers (fixes #12785)
(cherry picked from commit b736317)
  • Loading branch information
jef-n committed Jun 29, 2015
1 parent fab092a commit 391e99c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/providers/spatialite/qgsspatialitefeatureiterator.cpp
Expand Up @@ -354,8 +354,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 391e99c

Please sign in to comment.