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 | 6d56f397e2c4a0cdbc9aff0a38fa29c3196986c4 (patch) | |
tree | af3710bf3e7337f6c6c28f4786a94336b49ff7e6 | |
parent | ed9af7616e76f0a5111d3e5a56eb9d1d3025c1a6 (diff) | |
download | txr-6d56f397e2c4a0cdbc9aff0a38fa29c3196986c4.tar.gz txr-6d56f397e2c4a0cdbc9aff0a38fa29c3196986c4.tar.bz2 txr-6d56f397e2c4a0cdbc9aff0a38fa29c3196986c4.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); |