This commit is contained in:
Hisham 2016-03-31 00:19:59 -03:00
commit d15555ed2c
1 changed files with 1 additions and 4 deletions

View File

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