From af11cf8971267c7e44c400477383d5fa8acf9771 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 31 Aug 2012 14:58:21 -0700 Subject: * stream.c (vformat): Bugfix: under the ~a and ~s directives, apply field formatting to the object not only if a nonzero width has been specified, but also if precision has been specified. * txr.1: documented stream global variables and format. --- stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stream.c') diff --git a/stream.c b/stream.c index dce01c15..8d37bc72 100644 --- a/stream.c +++ b/stream.c @@ -1285,7 +1285,7 @@ val vformat(val stream, val fmtstr, va_list vl) precision = 0; goto output_num; default: - if (width != 0) { + if (width != 0 || precision_p) { val str = format(nil, ch == 'a' ? lit("~a") : lit("~s"), obj, nao); if (!vformat_str(stream, str, width, left, precision)) -- cgit v1.2.3