aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2023-10-17 18:28:27 +0000
committerdrh <>2023-10-17 18:28:27 +0000
commit42b49a3138aa7009c8f36744aa309d932edcd4af (patch)
treef242e1157d05feed03ef09d748599840bea953d1 /src
parent4c827feba18d91ecee7680d3026ccd909957b127 (diff)
downloadsqlite-42b49a3138aa7009c8f36744aa309d932edcd4af.tar.gz
sqlite-42b49a3138aa7009c8f36744aa309d932edcd4af.zip
Omit an unreachable branch when SQLITE_ENABLE_API_ARMOR is not defined.
FossilOrigin-Name: 5f8b807b568f4f9ec65f1c924e0e1ac2f996f405e045204145ad7116be7580ee
Diffstat (limited to 'src')
-rw-r--r--src/vdbeapi.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/vdbeapi.c b/src/vdbeapi.c
index b7b3b94cd..31ebbc697 100644
--- a/src/vdbeapi.c
+++ b/src/vdbeapi.c
@@ -375,7 +375,7 @@ void sqlite3_value_free(sqlite3_value *pOld){
** is too big or if an OOM occurs.
**
** The invokeValueDestructor(P,X) routine invokes destructor function X()
-** on value P is not going to be used and need to be destroyed.
+** on value P if P is not going to be used and need to be destroyed.
*/
static void setResultStrOrError(
sqlite3_context *pCtx, /* Function context */
@@ -415,9 +415,14 @@ static int invokeValueDestructor(
}else{
xDel((void*)p);
}
+#ifdef SQLITE_ENABLE_API_ARMOR
if( pCtx!=0 ){
sqlite3_result_error_toobig(pCtx);
}
+#else
+ assert( pCtx!=0 );
+ sqlite3_result_error_toobig(pCtx);
+#endif
return SQLITE_TOOBIG;
}
void sqlite3_result_blob(