Skip to content

Commit b736317

Browse files
committed
spatialite provider: load 64bit integers (fixes #12785)
1 parent 014f070 commit b736317

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/providers/spatialite/qgsspatialitefeatureiterator.cpp

+10-2
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,16 @@ QVariant QgsSpatiaLiteFeatureIterator::getFeatureAttribute( sqlite3_stmt* stmt,
369369
{
370370
if ( sqlite3_column_type( stmt, ic ) == SQLITE_INTEGER )
371371
{
372-
// INTEGER value
373-
return sqlite3_column_int( stmt, ic );
372+
if ( type == QVariant::Int )
373+
{
374+
// INTEGER value
375+
return sqlite3_column_int( stmt, ic );
376+
}
377+
else
378+
{
379+
// INTEGER value
380+
return ( qint64 ) sqlite3_column_int64( stmt, ic );
381+
}
374382
}
375383

376384
if ( sqlite3_column_type( stmt, ic ) == SQLITE_FLOAT )

0 commit comments

Comments
 (0)