aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordrh <>2023-10-23 12:16:27 +0000
committerdrh <>2023-10-23 12:16:27 +0000
commitbd8941a4f8f08b12d1ec463cd236fc3644958f74 (patch)
tree943b223ada9a1dc76eba1e8322c24b4ac8bda38e /src/expr.c
parentf49d52d6426a29e529da3f8960233c0ada29a61f (diff)
downloadsqlite-bd8941a4f8f08b12d1ec463cd236fc3644958f74.tar.gz
sqlite-bd8941a4f8f08b12d1ec463cd236fc3644958f74.zip
Fix sqlite3ExprDup() alignment assertions so that they work on 32-bit
platforms. FossilOrigin-Name: 143f95efc7114455b1920f1d2f9a867392740f608d1dda4306005f01238103f8
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/expr.c b/src/expr.c
index 3eb2c03ac..010c8ce6a 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -1601,10 +1601,10 @@ static Expr *exprDup(
nAlloc = dupedExprSize(p);
}else if( !ExprHasProperty(p, EP_IntValue) && p->u.zToken ){
nToken = sqlite3Strlen30NN(p->u.zToken)+1;
- nAlloc = EXPR_FULLSIZE + ROUND8(nToken);
+ nAlloc = ROUND8(EXPR_FULLSIZE + nToken);
}else{
nToken = 0;
- nAlloc = EXPR_FULLSIZE;
+ nAlloc = ROUND8(EXPR_FULLSIZE);
}
assert( nAlloc==ROUND8(nAlloc) );
sEdupBuf.zAlloc = sqlite3DbMallocRawNN(db, nAlloc);