From 641fd2c4ad81ee993c4b054d2d04075a08bc1413 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Fri, 4 Dec 2020 16:10:40 +0100 Subject: RichString: avoid signed integer misuse --- RichString.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'RichString.c') 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; } -- cgit v1.2.3