1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

When SQLITE_OMIT_FLOATING_POINT is defined, make sure the result of a

mathematical operation is always tagged as an integer.

FossilOrigin-Name: e12da0d316fcc34a75554d59fe6d11d9f0e059e2
This commit is contained in:
drh
2010-01-13 16:25:42 +00:00
parent 52d14521fa
commit c5a7b51c69
3 changed files with 15 additions and 10 deletions

View File

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