diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-12-04 16:10:40 +0100 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2020-12-05 20:01:10 +0100 |
commit | 641fd2c4ad81ee993c4b054d2d04075a08bc1413 (patch) | |
tree | fbe17abc09851a1b00331d06494a307b9bf665a1 /RichString.c | |
parent | f91368002058239bcee36a4825a5b0692c37d77a (diff) |
RichString: avoid signed integer misuse
Diffstat (limited to 'RichString.c')
-rw-r--r-- | RichString.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/RichString.c b/RichString.c index 1d2a3fee..790c15a9 100644 --- a/RichString.c +++ b/RichString.c @@ -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; } |