diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-10-07 20:56:40 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-10-07 20:56:40 -0700 |
commit | 7c09e25f5f611d2e17fc0c5b7f51802683107644 (patch) | |
tree | af3710bf3e7337f6c6c28f4786a94336b49ff7e6 | |
parent | b79eddb5ef66c17688572d20e44a60e49930b511 (diff) | |
download | txr-7c09e25f5f611d2e17fc0c5b7f51802683107644.tar.gz txr-7c09e25f5f611d2e17fc0c5b7f51802683107644.tar.bz2 txr-7c09e25f5f611d2e17fc0c5b7f51802683107644.zip |
small bug in format: handle missing format char.
* stream.c (formatv): When the format string ends
at the point where the format character is expected
to occur, do not emit an error about #\nul being
an unknown format directive character; emit
an error that the character is missing.
-rw-r--r-- | stream.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -3233,6 +3233,8 @@ val formatv(val stream_in, val fmtstr, struct args *al) else inc_indent(stream, num(width)); continue; + case 0: + uw_throwf(error_s, lit("missing format directive character"), nao); default: uw_throwf(error_s, lit("unknown format directive character ~s\n"), chr(ch), nao); |