mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-24 15:15:44 +00:00
RichString: avoid signed integer misuse
This commit is contained in:
parent
f913680020
commit
641fd2c4ad
@ -86,7 +86,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] = (data_c[j] >= 32 ? data_c[j] : '?') | attrs;
|
||||
this->chptr[i] = (((unsigned char)data_c[j]) >= 32 ? ((unsigned char)data_c[j]) : '?') | attrs;
|
||||
}
|
||||
this->chptr[newLen] = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user