summaryrefslogtreecommitdiffstats
path: root/RichString.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2015-03-22 22:56:28 -0300
committerHisham Muhammad <hisham@gobolinux.org>2015-03-23 18:14:35 -0300
commit54f8d8154bf69d5f8477e3b067f41c6611a02944 (patch)
tree1d7ea03b4b58f627864cb1bda3a7167734377cf9 /RichString.c
parentade7993fcb468433d28e569e16e90de4251114ab (diff)
Do not trust isalpha(c) for values > 255.
Fixes #174. Conflicts: Panel.c
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 51914b08..22ffecb5 100644
--- a/RichString.c
+++ b/RichString.c
@@ -128,7 +128,7 @@ static inline void RichString_writeFrom(RichString* this, int attrs, const char*
int newLen = from + len;
RichString_setLen(this, newLen);
for (int i = from, j = 0; i < newLen; i++, j++)
- this->chptr[i] = (isprint(data_c[j]) ? data_c[j] : '?') | attrs;
+ this->chptr[i] = (data_c[j] >= 32 ? data_c[j] : '?') | attrs;
this->chptr[newLen] = 0;
}

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