aboutsummaryrefslogtreecommitdiff
path: root/src/printf.c
diff options
context:
space:
mode:
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 0cbd4c3c6..3e1782d46 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -649,7 +649,7 @@ void sqlite3_str_vappendf(
{
i64 szBufNeeded; /* Size of a temporary buffer needed */
szBufNeeded = MAX(e2,0)+(i64)precision+(i64)width+15;
- if( cThousand ) szBufNeeded += (e2+2)/3;
+ if( cThousand && e2>0 ) szBufNeeded += (e2+2)/3;
if( szBufNeeded > etBUFSIZE ){
bufpt = zExtra = printfTempBuf(pAccum, szBufNeeded);
if( bufpt==0 ) return;