mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Avoid trying to cast an over-sized floating point value into an integer.
FossilOrigin-Name: 3518cd7cb1feeefc3963da72c2d258d81d8914f1e1f427da28a00b6228cf126c
This commit is contained in:
@@ -315,8 +315,7 @@ static VdbeCursor *allocateCursor(
|
||||
*/
|
||||
static int alsoAnInt(Mem *pRec, double rValue, i64 *piValue){
|
||||
i64 iValue;
|
||||
if( rValue>(double)LARGEST_INT64 || rValue<(double)SMALLEST_INT64 ) return 0;
|
||||
iValue = (double)rValue;
|
||||
iValue = sqlite3RealToI64(rValue);
|
||||
if( sqlite3RealSameAsInt(rValue,iValue) ){
|
||||
*piValue = iValue;
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user