summaryrefslogtreecommitdiffstats
path: root/RichString.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2015-08-20 02:07:24 -0300
committerHisham Muhammad <hisham@gobolinux.org>2015-08-20 02:07:24 -0300
commit544c7efa6b9add8086a8170ee503b66e924c0875 (patch)
treefb172860aaa5d4ddd9ce19ab923b7d57e66490fc /RichString.c
parentc7387fac1516ef0dec3ddc92771a2986fe2067b4 (diff)
Omit non-printable characters with widechar curses.
Closes PR #111.
Diffstat (limited to 'RichString.c')
-rw-r--r--RichString.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/RichString.c b/RichString.c
index ffed3ee0..a5cc64f7 100644
--- a/RichString.c
+++ b/RichString.c
@@ -98,7 +98,7 @@ static inline void RichString_writeFrom(RichString* this, int attrs, const char*
for (int i = from, j = 0; i < newLen; i++, j++) {
CharType* c = &(this->chptr[i]);
c->attr = attrs;
- c->chars[0] = data[j];
+ c->chars[0] = (iswprint(data[j]) ? data[j] : '?');
c->chars[1] = 0;
}
this->chptr[newLen].chars[0] = 0;

© 2014-2024 Faster IT GmbH | imprint | privacy policy