CPUMeter: use correct buffer size

This commit is contained in:
Christian Göttsche 2021-08-28 17:57:37 +02:00 committed by BenBE
parent 4855d92469
commit 3f806368e0
1 changed files with 2 additions and 2 deletions

View File

@ -52,9 +52,9 @@ static void CPUMeter_init(Meter* this) {
// Custom uiName runtime logic to include the param (processor)
static void CPUMeter_getUiName(const Meter* this, char* buffer, size_t length) {
if (this->param > 0)
xSnprintf(buffer, sizeof(length), "%s %u", Meter_uiName(this), this->param);
xSnprintf(buffer, length, "%s %u", Meter_uiName(this), this->param);
else
xSnprintf(buffer, sizeof(length), "%s", Meter_uiName(this));
xSnprintf(buffer, length, "%s", Meter_uiName(this));
}
static void CPUMeter_updateValues(Meter* this) {