aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/expr.c b/src/expr.c
index ea5906265..2aef57567 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -3709,7 +3709,11 @@ expr_code_doover:
return target;
}
default: {
- testcase( op!=TK_NULL );
+ /* Make NULL the default case so that if a bug causes an illegal
+ ** Expr node to be passed into this function, it will be handled
+ ** sanely and not crash. But keep an assert() to bring the problem
+ ** to the attention of the developers. */
+ assert( op==TK_NULL );
sqlite3VdbeAddOp2(v, OP_Null, 0, target);
return target;
}