Commit 5cc89986 authored by Hisham Muhammad's avatar Hisham Muhammad
Browse files

never show nan%

parent 8f230920
......@@ -64,6 +64,7 @@ static void CPUMeter_setValues(Meter* this, char* buffer, int size) {
this->type->items = 3;
cpu = MIN(100.0, MAX(0.0, (this->values[0]+this->values[1]+this->values[2])));
}
if (isnan(cpu)) cpu = 0.0;
snprintf(buffer, size, "%5.1f%%", cpu );
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment