aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordan <Dan Kennedy>2022-02-11 16:10:18 +0000
committerdan <Dan Kennedy>2022-02-11 16:10:18 +0000
commit63a47336afb8ae8f3e4a48b5f5a19201b1f04e13 (patch)
tree55fcf3987757c731e61590994ecd9c0d21fa43a8 /src
parent85548fac8d11c6e5b2922bdea95d169852342e13 (diff)
downloadsqlite-63a47336afb8ae8f3e4a48b5f5a19201b1f04e13.tar.gz
sqlite-63a47336afb8ae8f3e4a48b5f5a19201b1f04e13.zip
Fix a problem in [c006515ae6faff65] causing an assert() to fail with some build configurations.
FossilOrigin-Name: d7ff262d6d1fd8b855bcb8f6f54ab1833663a4d8187701ddf045f6b5a62a5d1d
Diffstat (limited to 'src')
-rw-r--r--src/vdbeapi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vdbeapi.c b/src/vdbeapi.c
index 68d2d283d..6939813a2 100644
--- a/src/vdbeapi.c
+++ b/src/vdbeapi.c
@@ -1594,7 +1594,10 @@ int sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){
break;
}
case SQLITE_FLOAT: {
- rc = sqlite3_bind_double(pStmt, i, sqlite3VdbeRealValue((Mem*)pValue));
+ assert( pValue->flags & (MEM_Real|MEM_IntReal) );
+ rc = sqlite3_bind_double(pStmt, i,
+ (pValue->flags & MEM_Real) ? pValue->u.r : (double)pValue->u.i
+ );
break;
}
case SQLITE_BLOB: {