summaryrefslogtreecommitdiffstats
path: root/Meter.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2021-03-12 16:49:45 +0100
committerChristian Göttsche <cgzones@googlemail.com>2021-03-12 16:49:45 +0100
commit350b48e44c45a280520c15762a04940670b6aec9 (patch)
tree60abbaf3b5bb7fe0f1235dae116058d700a86f18 /Meter.c
parentc38819a67548dbb432fa6995db9e58918316ace9 (diff)
Meter: do not access RichString internals
Use a temporary local variable
Diffstat (limited to 'Meter.c')
-rw-r--r--Meter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Meter.c b/Meter.c
index d7a17552..197eb153 100644
--- a/Meter.c
+++ b/Meter.c
@@ -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

© 2014-2024 Faster IT GmbH | imprint | privacy policy