aboutsummaryrefslogtreecommitdiff
path: root/src/vdbeapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vdbeapi.c')
-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(