summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--stream.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 9a9419fc..1ed7ff51 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2015-08-04 Kaz Kylheku <kaz@kylheku.com>
+ * 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 <kaz@kylheku.com>
+
* stream.c (string_out_put_string): Do not return nil when
buffer calculations overflow, but throw exception.
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 {