aboutsummaryrefslogtreecommitdiff
path: root/src/printf.c
diff options
context:
space:
mode:
authordan <Dan Kennedy>2024-02-21 16:12:23 +0000
committerdan <Dan Kennedy>2024-02-21 16:12:23 +0000
commitebd99d5708fdc32b599faa1d8e1661fc6395e12d (patch)
tree13eef8e0c78c6a3a608d4ba51fae04a620809f19 /src/printf.c
parenteb715f022f71d912e11b51ba7ab68f77d92e0234 (diff)
parent21eda699d7154c045c72e8c848ebe2ade011165f (diff)
downloadsqlite-ebd99d5708fdc32b599faa1d8e1661fc6395e12d.tar.gz
sqlite-ebd99d5708fdc32b599faa1d8e1661fc6395e12d.zip
Merge trunk changes into this branch.
FossilOrigin-Name: 63e8846ac1dc1cf1f7071c4634ccbfec3c13560db6afec376cd91515b62430d3
Diffstat (limited to 'src/printf.c')
-rw-r--r--src/printf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/printf.c b/src/printf.c
index 2e09431bf..186e95bb8 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -534,13 +534,14 @@ void sqlite3_str_vappendf(
}
exp = s.iDP-1;
- if( xtype==etGENERIC && precision>0 ) precision--;
/*
** If the field type is etGENERIC, then convert to either etEXP
** or etFLOAT, as appropriate.
*/
if( xtype==etGENERIC ){
+ assert( precision>0 );
+ precision--;
flag_rtz = !flag_alternateform;
if( exp<-4 || exp>precision ){
xtype = etEXP;