diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2021-03-12 16:49:45 +0100 |
---|---|---|
committer | Christian Göttsche <cgzones@googlemail.com> | 2021-03-12 16:49:45 +0100 |
commit | 350b48e44c45a280520c15762a04940670b6aec9 (patch) | |
tree | 60abbaf3b5bb7fe0f1235dae116058d700a86f18 | |
parent | c38819a67548dbb432fa6995db9e58918316ace9 (diff) |
Meter: do not access RichString internals
Use a temporary local variable
-rw-r--r-- | Meter.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |