From 54f8d8154bf69d5f8477e3b067f41c6611a02944 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Sun, 22 Mar 2015 22:56:28 -0300 Subject: Do not trust isalpha(c) for values > 255. Fixes #174. Conflicts: Panel.c --- RichString.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'RichString.c') 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; } -- cgit v1.2.3