Skip to content

Commit

Permalink
tweak 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Explorer09 committed Aug 25, 2024
1 parent 89900db commit fa2a733
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Meter.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,14 +266,10 @@ static void GraphMeterMode_draw(Meter* this, int x, int y, int w) {
memmove(&data->values[0], &data->values[1], (nValues - 1) * sizeof(*data->values));

data->values[nValues - 1] = 0.0;
if (this->curItems > 0) {
if (this->curItems > 0 && (!isPercentChart || this->total > 0.0)) {
data->values[nValues - 1] = Meter_computeSum(this);
if (isPercentChart) {
if (this->total > 0.0) {
data->values[nValues - 1] /= this->total;
} else {
data->values[nValues - 1] = 0.0;
}
data->values[nValues - 1] /= this->total;
}
}
}
Expand Down

0 comments on commit fa2a733

Please sign in to comment.