This commit is contained in:
Hisham 2016-03-31 00:19:59 -03:00
commit d15555ed2c

View File

@ -287,11 +287,8 @@ static void BarMeterMode_draw(Meter* this, int x, int y, int w) {
char bar[w + 1];
int blockSizes[10];
for (int i = 0; i < w; i++)
bar[i] = ' ';
const size_t barOffset = w - MIN((int)strlen(buffer), w);
snprintf(bar + barOffset, w - barOffset + 1, "%s", buffer);
snprintf(bar, w + 1, "%*s", w, buffer);
// First draw in the bar[] buffer...
int offset = 0;