aboutsummaryrefslogtreecommitdiff
path: root/src/vdbemem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vdbemem.c')
-rw-r--r--src/vdbemem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vdbemem.c b/src/vdbemem.c
index 37d92aca1..db527327e 100644
--- a/src/vdbemem.c
+++ b/src/vdbemem.c
@@ -143,7 +143,7 @@ SQLITE_NOINLINE int sqlite3VdbeMemGrow(Mem *pMem, int n, int bPreserve){
}
}
- if( pMem->z && bPreserve && pMem->z!=pMem->zMalloc ){
+ if( bPreserve && pMem->z && pMem->z!=pMem->zMalloc ){
memcpy(pMem->zMalloc, pMem->z, pMem->n);
}
if( (pMem->flags&MEM_Dyn)!=0 ){