From d34645f8f1b958454f182fcc061a05fefe48f4df Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Mon, 23 Nov 2015 03:46:43 -0200 Subject: Array entries have been oddly flipped here for years. --- RichString.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'RichString.c') diff --git a/RichString.c b/RichString.c index 8a06baae..c9c02dec 100644 --- a/RichString.c +++ b/RichString.c @@ -100,8 +100,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++) { - CharType* c = &(this->chptr[i]); - *c = (CharType) { .attr = attrs, .chars = { (iswprint(data[j]) ? data[j] : '?') } }; + this->chptr[i] = (CharType) { .attr = attrs & 0xffffff, .chars = { (iswprint(data[j]) ? data[j] : '?') } }; } } -- cgit v1.2.3