mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-08 03:22:21 +03:00
Handle empty blob constants correctly. Ticket #1373. (CVS 2615)
FossilOrigin-Name: 5cada745ac9bf18a65d21705a398b2bb8bd1aaa2
This commit is contained in:
12
src/expr.c
12
src/expr.c
@@ -12,7 +12,7 @@
|
||||
** This file contains routines used for analyzing expressions and
|
||||
** for generating VDBE code that evaluates expressions in SQLite.
|
||||
**
|
||||
** $Id: expr.c,v 1.218 2005/08/19 03:03:52 drh Exp $
|
||||
** $Id: expr.c,v 1.219 2005/08/23 11:17:59 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@@ -1467,8 +1467,16 @@ void sqlite3ExprCode(Parse *pParse, Expr *pExpr){
|
||||
}
|
||||
#ifndef SQLITE_OMIT_BLOB_LITERAL
|
||||
case TK_BLOB: {
|
||||
int n;
|
||||
const char *z;
|
||||
assert( TK_BLOB==OP_HexBlob );
|
||||
sqlite3VdbeOp3(v, op, 0, 0, pExpr->token.z+2, pExpr->token.n-3);
|
||||
n = pExpr->token.n - 3;
|
||||
z = pExpr->token.z + 2;
|
||||
assert( n>=0 );
|
||||
if( n==0 ){
|
||||
z = "";
|
||||
}
|
||||
sqlite3VdbeOp3(v, op, 0, 0, z, n);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user