mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-15 21:44:36 +03:00
Do not trust isalpha(c) for values > 255.
Fixes #174. Conflicts: Panel.c
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user