diff options
author | drh <drh@noemail.net> | 2005-11-28 12:36:35 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2005-11-28 12:36:35 +0000 |
commit | 9267bdcecdb472ee6d302e25fc27b6e936eb57a6 (patch) | |
tree | 0a24b503c756abed1fae6b12a8ba641dd6127727 /src/expr.c | |
parent | 9a5f7474e37263b3a38c79a4b98f712a497ddd6e (diff) | |
download | sqlite-9267bdcecdb472ee6d302e25fc27b6e936eb57a6.tar.gz sqlite-9267bdcecdb472ee6d302e25fc27b6e936eb57a6.zip |
Replace a call to sprintf() with sqlite3MPrintf() since on some embedded
platforms, sprintf() is busted. Need to go through and do similar replacements
elsewhere in the code. (CVS 2790)
FossilOrigin-Name: 1b4f2d89bbe833359cefcea580783fd92aa7b8ab
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/expr.c b/src/expr.c index 0a31ab47b..24def4f39 100644 --- a/src/expr.c +++ b/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.238 2005/11/16 12:53:15 drh Exp $ +** $Id: expr.c,v 1.239 2005/11/28 12:36:36 drh Exp $ */ #include "sqliteInt.h" #include <ctype.h> @@ -1614,8 +1614,7 @@ void sqlite3ExprCode(Parse *pParse, Expr *pExpr){ assert( pLeft ); if( pLeft->op==TK_FLOAT || pLeft->op==TK_INTEGER ){ Token *p = &pLeft->token; - char *z = sqliteMalloc( p->n + 2 ); - sprintf(z, "-%.*s", p->n, p->z); + char *z = sqlite3MPrintf("-%.*s", p->n, p->z); if( pLeft->op==TK_FLOAT ){ sqlite3VdbeOp3(v, OP_Real, 0, 0, z, p->n+1); }else{ |