aboutsummaryrefslogtreecommitdiff
path: root/src/printf.c
diff options
context:
space:
mode:
authordrh <>2023-06-29 17:36:18 +0000
committerdrh <>2023-06-29 17:36:18 +0000
commit0b1a1e8c37fb3544a92fcd5ed01a92da38f044c1 (patch)
treec7176954ce9beeec757344eb41bd8b04e58533b9 /src/printf.c
parenta75011a891db06ae496851f8fe8a4a95bec74fe0 (diff)
downloadsqlite-0b1a1e8c37fb3544a92fcd5ed01a92da38f044c1.tar.gz
sqlite-0b1a1e8c37fb3544a92fcd5ed01a92da38f044c1.zip
Improve the range of floating-point numbers that can be handled as integers
for numeric-to-text conversion. FossilOrigin-Name: 41580ba452fdbc3f73da60d8030289d38614c4cab8d24140d7cc44a54b2da8d2
Diffstat (limited to 'src/printf.c')
-rw-r--r--src/printf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/printf.c b/src/printf.c
index 77108929c..37033ee50 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -559,7 +559,7 @@ void sqlite3_str_vappendf(
exp = 0;
if( xtype==etGENERIC && precision>0 ) precision--;
testcase( precision>0xfff );
- if( realvalue<1.0e+16
+ if( realvalue<9.22e+18
&& realvalue==(LONGDOUBLE_TYPE)(longvalue = (u64)realvalue)
){
/* Number is a pure integer that can be represented as u64 */