aboutsummaryrefslogtreecommitdiff
path: root/src/printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/printf.c')
-rw-r--r--src/printf.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/printf.c b/src/printf.c
index d59855917..65e539bef 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -586,8 +586,13 @@ void sqlite3_str_vappendf(
realvalue += rounder;
}
if( sqlite3IsNaN((double)realvalue) ){
- bufpt = "NaN";
- length = 3;
+ if( flag_zeropad ){
+ bufpt = "null";
+ length = 4;
+ }else{
+ bufpt = "NaN";
+ length = 3;
+ }
break;
}