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 5f93209b..97934867 100644
--- a/stream.c
+++ b/stream.c
@@ -651,7 +651,7 @@ static val vformat_num(val stream, const char *str,
int width, int left, int pad, int precision)
{
int len = strlen(str);
- int truewidth = (width < precision) ? width : precision;
+ int truewidth = (width > precision) ? width : precision;
int slack = (len < truewidth) ? truewidth - len : 0;
int padlen = (len < precision) ? precision - len : 0;
int i;