tools: fix compiler error on older compilers

COLS could be very small and the statusbar array might overflow with
strcpy and strcat. Also initializing the variable array seems to cause
problems on older compilers.

Instead use a fixed array that is big enough to hold all possible
values we write into it.
This commit is contained in:
Wim Taymans 2026-04-09 16:32:16 +02:00
parent 1ed1349e7c
commit b1a9bc966b

View file

@ -581,7 +581,8 @@ static void do_refresh(struct data *d, bool force_refresh)
return;
if (!d->batch_mode) {
char statusbar[COLS] = {};
char statusbar[255] = { 0 };
if (!((filter->state == PW_NODE_STATE_ERROR) &&
(filter->followers == PW_NODE_STATE_ERROR))) {