summaryrefslogtreecommitdiffstats
path: root/utf8.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2019-05-23 21:02:30 +0100
committerThomas Adam <thomas@xteddy.org>2019-05-23 21:02:30 +0100
commit19a3a9ee20d09d7210ef278d908913fca60575b7 (patch)
treeaf84111c7c9e43e821c6d274a1d16869bb46ec25 /utf8.c
parente817821104b886de7afdf7c365aeced134d6d966 (diff)
parentf3e01ecc42e34a914ee390658625e920d321734a (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/utf8.c b/utf8.c
index d342455a..d3220762 100644
--- a/utf8.c
+++ b/utf8.c
@@ -209,7 +209,9 @@ utf8_strvis(char *dst, const char *src, size_t len, int flag)
src -= ud.have;
}
if (src[0] == '$' && src < end - 1) {
- if (isalpha((u_char)src[1]) || src[1] == '_')
+ if (isalpha((u_char)src[1]) ||
+ src[1] == '_' ||
+ src[1] == '{')
*dst++ = '\\';
*dst++ = '$';
} else if (src < end - 1)