aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/expr.c b/src/expr.c
index 746b598a8..8960a7ad9 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.410 2009/01/20 16:53:40 danielk1977 Exp $
+** $Id: expr.c,v 1.411 2009/02/04 03:59:25 shane Exp $
*/
#include "sqliteInt.h"
@@ -1932,12 +1932,10 @@ int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target){
case TK_UMINUS: {
Expr *pLeft = pExpr->pLeft;
assert( pLeft );
- if( pLeft->op==TK_FLOAT || pLeft->op==TK_INTEGER ){
- if( pLeft->op==TK_FLOAT ){
- codeReal(v, (char*)pLeft->token.z, pLeft->token.n, 1, target);
- }else{
- codeInteger(v, pLeft, 1, target);
- }
+ if( pLeft->op==TK_FLOAT ){
+ codeReal(v, (char*)pLeft->token.z, pLeft->token.n, 1, target);
+ }else if( pLeft->op==TK_INTEGER ){
+ codeInteger(v, pLeft, 1, target);
}else{
regFree1 = r1 = sqlite3GetTempReg(pParse);
sqlite3VdbeAddOp2(v, OP_Integer, 0, r1);