summaryrefslogtreecommitdiffstats
path: root/RichString.c
diff options
context:
space:
mode:
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;