diff options
Diffstat (limited to 'src/vdbeapi.c')
-rw-r--r-- | src/vdbeapi.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vdbeapi.c b/src/vdbeapi.c index 920780a89..7f44d22bc 100644 --- a/src/vdbeapi.c +++ b/src/vdbeapi.c @@ -514,6 +514,15 @@ void sqlite3_result_text64( (void)invokeValueDestructor(z, xDel, pCtx); }else{ setResultStrOrError(pCtx, z, (int)n, enc, xDel); + if( xDel==sqlite3_free && enc==SQLITE_UTF8 ){ + Mem *pOut = pCtx->pOut; + if( pOut->z==z + && sqlite3_msize(pOut->z)>=pOut->n+1 + && pOut->z[n]==0 + ){ + pOut->flags |= MEM_Term; + } + } } } #ifndef SQLITE_OMIT_UTF16 |