From f4c63c7c6779b8dd9b1fc850d27b2a502486c1de Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 4 Aug 2015 20:22:44 -0700 Subject: * stream.c (vormat): Bugfix: when width specified as * meets a negative argument, the width should be treated as positive and the field left aligned. Instead, the width is treated as zero. --- ChangeLog | 7 +++++++ stream.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9a9419fc..1ed7ff51 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2015-08-04 Kaz Kylheku + + * stream.c (vormat): Bugfix: when width specified as * + meets a negative argument, the width should be treated + as positive and the field left aligned. Instead, the + width is treated as zero. + 2015-08-04 Kaz Kylheku * stream.c (string_out_put_string): Do not return nil when diff --git a/stream.c b/stream.c index cf1f5a96..a44db8db 100644 --- a/stream.c +++ b/stream.c @@ -2209,7 +2209,7 @@ val vformat(val stream, val fmtstr, va_list vl) do_digits: switch (saved_state) { case vf_width: - if (width < 0) { + if (digits < 0) { width = -digits; align = al_left; } else { -- cgit v1.2.3