summaryrefslogtreecommitdiffstats
path: root/stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream.c')
-rw-r--r--stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stream.c b/stream.c
index c430f2ee..1eaafc27 100644
--- a/stream.c
+++ b/stream.c
@@ -1272,7 +1272,7 @@ val vformat(val stream, val fmtstr, va_list vl)
*exp = 0;
}
- if (ch == 's' && !precision_p && !dec && !exp)
+ if (ch == 's' && (!precision_p || precision > 0) && !dec && !exp)
strcat(num_buf, ".0");
}