summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-01-12 20:45:12 -0800
committerKaz Kylheku <kaz@kylheku.com>2016-01-12 20:45:12 -0800
commit2fdb219a541e1df448c12fff185012e09c562128 (patch)
tree4705bfb266aa70b881aec86a911e6314d375f24b
parent2f2d54535220da098bd5f470fa8b28684dcc1534 (diff)
downloadtxr-2fdb219a541e1df448c12fff185012e09c562128.tar.gz
txr-2fdb219a541e1df448c12fff185012e09c562128.tar.bz2
txr-2fdb219a541e1df448c12fff185012e09c562128.zip
Fix broken print of semicolon after ctrl char.
* lib.c (out_str_char): If semi-flag is true, we must issue a semicolon not only when the next character is a hex digit, but also when it is a semicolon, so that "\x1F;;" isn't rendered as "\x1F;" where the semicolon character has disappeared.
-rw-r--r--lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index 9fb50a10..c0c8b5de 100644
--- a/lib.c
+++ b/lib.c
@@ -8266,7 +8266,7 @@ static val simple_qref_args_p(val args, val pos)
void out_str_char(wchar_t ch, val out, int *semi_flag)
{
- if (*semi_flag && iswxdigit(ch))
+ if (*semi_flag && (iswxdigit(ch) || ch == ';'))
put_char(chr(';'), out);
*semi_flag = 0;