From 350b48e44c45a280520c15762a04940670b6aec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Fri, 12 Mar 2021 16:49:45 +0100 Subject: Meter: do not access RichString internals Use a temporary local variable --- Meter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Meter.c') 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 -- cgit v1.2.3