diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-12-15 12:05:20 +0100 |
---|---|---|
committer | Christian Göttsche <cgzones@googlemail.com> | 2020-12-15 12:05:39 +0100 |
commit | 79970f05f37677fe32aa804e493c5da747a2652f (patch) | |
tree | 1e385c2e89424f354d8d80b2d81d03cda7be49b5 /Meter.c | |
parent | 61b8e31b4184257e2086024a78a8798ffac09dfa (diff) |
Meter: restore non-wide-character build
Use mbstowcs() only with wide ncurses support.
Closes: #401
Diffstat (limited to 'Meter.c')
-rw-r--r-- | Meter.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -196,7 +196,11 @@ static void BarMeterMode_draw(Meter* this, int x, int y, int w) { // The text in the bar is right aligned; // calculate needed padding and generate leading spaces +#ifdef HAVE_LIBNCURSESW const int textLen = mbstowcs(NULL, buffer, 0); +#else + const int textLen = strlen(buffer); +#endif const int padding = CLAMP(w - textLen, 0, w); RichString_begin(bar); |