aboutsummaryrefslogtreecommitdiff
path: root/src/printf.c
diff options
context:
space:
mode:
authordrh <>2024-02-19 18:55:32 +0000
committerdrh <>2024-02-19 18:55:32 +0000
commitf40da9226d3693574e4f600e6fa2e933c97ea5f1 (patch)
tree523057e3a03d1ac554df93a5458b4bf08a04e8b1 /src/printf.c
parente7bdb2172c717f7ba64e15fb65b930524e759d71 (diff)
parente0a9935be1c506646566f6b7845eb381bb219e16 (diff)
downloadsqlite-f40da9226d3693574e4f600e6fa2e933c97ea5f1.tar.gz
sqlite-f40da9226d3693574e4f600e6fa2e933c97ea5f1.zip
Merge trunk fixes into the better-optimize branch.
FossilOrigin-Name: 2cf78a5b5fce7f2d49ce185d27f50722c91a1d6c91bbcecebd4bb5244a76769f
Diffstat (limited to 'src/printf.c')
-rw-r--r--src/printf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/printf.c b/src/printf.c
index c6b3803ca..2e09431bf 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -498,6 +498,7 @@ void sqlite3_str_vappendf(
if( xtype==etFLOAT ){
iRound = -precision;
}else if( xtype==etGENERIC ){
+ if( precision==0 ) precision = 1;
iRound = precision;
}else{
iRound = precision+1;