Array entries have been oddly flipped here for years.

This commit is contained in:
Hisham Muhammad
2015-11-23 03:46:43 -02:00
parent f02d8f4386
commit d34645f8f1
3 changed files with 8 additions and 10 deletions

View File

@ -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] : '?') } };
}
}