Meter: do not access RichString internals

Use a temporary local variable
This commit is contained in:
Christian Göttsche 2021-03-12 16:49:45 +01:00
parent c38819a675
commit 350b48e44c

View File

@ -405,8 +405,8 @@ static void LEDMeterMode_draw(Meter* this, int x, int y, ATTR_UNUSED int w) {
xx += 4;
} else {
#ifdef HAVE_LIBNCURSESW
out.chptr[i].attr = 0; /* use LED_COLOR from attrset() */
mvadd_wch(yText, xx, &out.chptr[i]);
const cchar_t wc = { .chars = { c, '\0' }, .attr = 0 }; /* use LED_COLOR from attrset() */
mvadd_wch(yText, xx, &wc);
#else
mvaddch(yText, xx, c);
#endif