aboutsummaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2016-03-02 18:10:51 +0000
committerThomas Adam <thomas@xteddy.org>2016-03-02 18:10:51 +0000
commite304673c65d774bb76e5d55c095c8c8e6b05ff91 (patch)
treeaf461e71978b76dad59348d924a37f62b8c0bb7d /input.c
parente9d369a09e48ea8f940958025c8444988d31e840 (diff)
parentb8a102d26f41e57b94359627a4df8f22af10c6fa (diff)
downloadrtmux-e304673c65d774bb76e5d55c095c8c8e6b05ff91.tar.gz
rtmux-e304673c65d774bb76e5d55c095c8c8e6b05ff91.tar.bz2
rtmux-e304673c65d774bb76e5d55c095c8c8e6b05ff91.zip
Merge branch 'obsd-master'
Conflicts: utf8.c
Diffstat (limited to 'input.c')
-rw-r--r--input.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/input.c b/input.c
index ae205024..18c8eb9a 100644
--- a/input.c
+++ b/input.c
@@ -1960,8 +1960,14 @@ input_utf8_close(struct input_ctx *ictx)
{
struct utf8_data *ud = &ictx->utf8data;
- if (utf8_append(ud, ictx->ch) != UTF8_DONE)
- fatalx("UTF-8 close invalid %#x", ictx->ch);
+ if (utf8_append(ud, ictx->ch) != UTF8_DONE) {
+ /*
+ * An error here could be invalid UTF-8 or it could be a
+ * nonprintable character for which we can't get the
+ * width. Drop it.
+ */
+ return (0);
+ }
log_debug("%s %hhu '%*s' (width %hhu)", __func__, ud->size,
(int)ud->size, ud->data, ud->width);