mirror of
https://github.com/aristocratos/btop.git
synced 2024-06-18 18:34:36 +12:00
Fix basic_string::_M_create exception
when 1000>hz>999.5, round(hz)=1000 btop_draw.cpp: 793: Symbols::h_line * (7 - cpuHz.size()) exception
This commit is contained in:
parent
b2df50396b
commit
81d09860f7
|
@ -583,7 +583,7 @@ namespace Cpu {
|
||||||
cpuhz += " GHz";
|
cpuhz += " GHz";
|
||||||
}
|
}
|
||||||
else if (hz > 0)
|
else if (hz > 0)
|
||||||
cpuhz = to_string((int)round(hz)) + " MHz";
|
cpuhz = to_string((int)hz) + " MHz";
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (const std::exception& e) {
|
catch (const std::exception& e) {
|
||||||
|
|
Loading…
Reference in a new issue