aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2024-02-20 13:11:27 +0000
committerdrh <>2024-02-20 13:11:27 +0000
commitb468e6832288292695ff5dc6782dd1e5334ee8f6 (patch)
tree1c77b0a898d9fe52a6b10b83aa46488c19b962eb /src
parent4b2eeb289bef1735ab56aa4867f2c3b69550b9c2 (diff)
downloadsqlite-b468e6832288292695ff5dc6782dd1e5334ee8f6.tar.gz
sqlite-b468e6832288292695ff5dc6782dd1e5334ee8f6.zip
Remove an unreachable branch from printf(). Change it into an assert().
FossilOrigin-Name: 4c9886b692706723f4b68f58dfef07ab19b192fd19b953917f23b55655af3e02
Diffstat (limited to 'src')
-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;