diff options
author | drh <drh@noemail.net> | 2010-01-13 16:25:42 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2010-01-13 16:25:42 +0000 |
commit | c5a7b51c695ba6698a70ad86f6c0481fbd9c0564 (patch) | |
tree | 41876edf571ae0c35638cfffe23c8a0e316beb73 /src | |
parent | 52d14521fa428d232b61b3b73bcfbb53c6e2d3e4 (diff) | |
download | sqlite-c5a7b51c695ba6698a70ad86f6c0481fbd9c0564.tar.gz sqlite-c5a7b51c695ba6698a70ad86f6c0481fbd9c0564.zip |
When SQLITE_OMIT_FLOATING_POINT is defined, make sure the result of a
mathematical operation is always tagged as an integer.
FossilOrigin-Name: e12da0d316fcc34a75554d59fe6d11d9f0e059e2
Diffstat (limited to 'src')
-rw-r--r-- | src/vdbe.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vdbe.c b/src/vdbe.c index a7d693d53..af7e7ce9e 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -1297,6 +1297,10 @@ case OP_Remainder: { /* same as TK_REM, in1, in2, out3 */ break; } } +#ifdef SQLITE_OMIT_FLOATING_POINT + pOut->u.i = rB; + MemSetTypeFlag(pOut, MEM_Int); +#else if( sqlite3IsNaN(rB) ){ goto arithmetic_result_is_null; } @@ -1305,6 +1309,7 @@ case OP_Remainder: { /* same as TK_REM, in1, in2, out3 */ if( (flags & MEM_Real)==0 ){ sqlite3VdbeIntegerAffinity(pOut); } +#endif } break; |