mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-24 15:15:44 +00:00
CPUMeter: use correct buffer size
This commit is contained in:
parent
4855d92469
commit
3f806368e0
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user