Skip to content

Commit ddcad00

Browse files
committed
Fix CI numero 7
1 parent 7ffeb3d commit ddcad00

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

RichString.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,10 @@ void RichString_setAttrn_preserveWithStandout(RichString* this, int attrs, int s
259259
pair_content(passed_color_pair_number, &passed_fg_color, &passed_bg_color);
260260
}
261261

262-
const chtype* ch = this->chptr + start;
262+
chtype* ch = this->chptr + start;
263263
for (int i = start; i <= finish; i++) {
264264
// Extract foreground and background color indexes from the current char
265-
short currentCharPairNum = (short)PAIR_NUMBER(ch.attr);
265+
short currentCharPairNum = (short)PAIR_NUMBER(*ch);
266266
short before_fg_color = -1, before_bg_color = -1;
267267
if (currentCharPairNum != 0) {
268268
pair_content(currentCharPairNum, &before_fg_color, &before_bg_color);
@@ -277,9 +277,10 @@ void RichString_setAttrn_preserveWithStandout(RichString* this, int attrs, int s
277277
// If current char is not a space and its ColorPair Index is not the default 0,
278278
// apply our own attrToPass with STANDOUT + optionally ITALICS,
279279
// instead of the passed attrs, which has the BG highlight color
280-
ch = (ch != L' ' && currentCharPairNum != 0)
281-
? (ch.attr | attrToPass)
280+
*ch |= (ch != L' ' && currentCharPairNum != 0)
281+
? attrToPass
282282
: (unsigned int)attrs;
283+
ch++;
283284
}
284285
}
285286

0 commit comments

Comments
 (0)