diff options
author | drh <drh@noemail.net> | 2019-12-18 21:22:40 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2019-12-18 21:22:40 +0000 |
commit | c29af653e6a94ef2b4234030d2304dbc2c0cefcb (patch) | |
tree | 0d225cfb7f248c6638ddcf16efd157ad18ba4777 /src/expr.c | |
parent | 396afe6f6aa90a31303c183e11b2b2d4b7956b35 (diff) | |
download | sqlite-c29af653e6a94ef2b4234030d2304dbc2c0cefcb.tar.gz sqlite-c29af653e6a94ef2b4234030d2304dbc2c0cefcb.zip |
Change an unreachable testcase() into an assert()
FossilOrigin-Name: 062e00c4d7e30155299339eaefe6cbe01953894baebf0af6d7ab3295b7436eb7
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 6 |
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; } |