1
0
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:
drh
2009-08-21 13:22:25 +00:00
parent 9359c7b7ab
commit d00151613a
4 changed files with 26 additions and 17 deletions

View File

@@ -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);
}
}