summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/numfmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/numfmt.c b/src/numfmt.c
index e8f53fc3f..6091bb6bd 100644
--- a/src/numfmt.c
+++ b/src/numfmt.c
@@ -703,7 +703,7 @@ double_to_human (long double val, int precision,
*pfmt++ = '\'';
if (zero_padding_width)
- pfmt += snprintf (pfmt, sizeof (fmt) - 1, "0%ld", zero_padding_width);
+ pfmt += snprintf (pfmt, sizeof (fmt) - 2, "0%ld", zero_padding_width);
devmsg ("double_to_human:\n");