mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-08 03:22:21 +03:00
Change the expression code generator to account for the fact that the new
sqlite3AtoF() never returns NaN. Also, clarification of a comment in where.c. FossilOrigin-Name: 75f596a04a74eb3a538c7be5b41756c970a21a1b
This commit is contained in:
11
src/expr.c
11
src/expr.c
@@ -1708,13 +1708,10 @@ static void codeReal(Vdbe *v, const char *z, int negateFlag, int iMem){
|
||||
double value;
|
||||
char *zV;
|
||||
sqlite3AtoF(z, &value);
|
||||
if( sqlite3IsNaN(value) ){
|
||||
sqlite3VdbeAddOp2(v, OP_Null, 0, iMem);
|
||||
}else{
|
||||
if( negateFlag ) value = -value;
|
||||
zV = dup8bytes(v, (char*)&value);
|
||||
sqlite3VdbeAddOp4(v, OP_Real, 0, iMem, 0, zV, P4_REAL);
|
||||
}
|
||||
assert( !sqlite3IsNaN(value) ); /* The new AtoF never returns NaN */
|
||||
if( negateFlag ) value = -value;
|
||||
zV = dup8bytes(v, (char*)&value);
|
||||
sqlite3VdbeAddOp4(v, OP_Real, 0, iMem, 0, zV, P4_REAL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user