Skip to content

Commit

Permalink
Fix basic_string::_M_create exception
Browse files Browse the repository at this point in the history
when 1000>hz>999.5, round(hz)=1000
btop_draw.cpp: 793: Symbols::h_line * (7 - cpuHz.size())  exception
  • Loading branch information
rkmcode authored Jan 24, 2024
1 parent b2df503 commit 81d0986
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/linux/btop_collect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ namespace Cpu {
cpuhz += " GHz";
}
else if (hz > 0)
cpuhz = to_string((int)round(hz)) + " MHz";
cpuhz = to_string((int)hz) + " MHz";

}
catch (const std::exception& e) {
Expand Down

0 comments on commit 81d0986

Please sign in to comment.